---
title: "v1 Creates a subscription on the server"
slug: "creates-a-subscription-on-the-server-1"
updated: 2024-03-26T16:37:23Z
published: 2024-03-26T16:37:23Z
canonical: "help.rapididentity.com/creates-a-subscription-on-the-server-1"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt
> Use this file to discover all available pages before exploring further.
# v1 Creates a subscription on the server
Put/v1/tenants/{tenantId}/projects/{projectId}/subscriptions/{sub}
creates queues and routing keys so that you can publish and subscribe to a queue.
SecurityAPI KeyHeader parameter nameAuthorization
AWS Cognito Authorizer. Since there are no custom scopes the ID Token must be used for authorization
Path parameterstenantIdstringRequired
The RapidIdentity Cloud tenant id
projectIdstringRequired
The project id this service belongs. MUST be builtin or custom
substringRequired
The queue name.
Body parameters
Utilized to generate the routing key for the queue. This format is `tenants/{tenantId}/projects/{projectId}/topics/{sub}`
topic
An example for a topic
```json
{
"topic": "tenants/1234/projects/custom/topics/alerts"
}
```
objecttopicstring Required
Responses200
Subscription has been created successfully
objectsuccessstring
403
The request is not authorized. Check that an api key exists and that the api key is valid for the tenantId
objecterrorstring
500
Error creating dead letter subscription
objecterrorstring
501
The request does not have a projectId of custom or builtin
objecterrorstring
503
Unable to connect to pubsub service
objecterrorstring