--- title: "Creates a subscription on the server" slug: "creates-a-subscription-on-the-server" updated: 2024-03-26T16:37:23Z published: 2024-03-26T16:37:23Z canonical: "help.rapididentity.com/creates-a-subscription-on-the-server" --- > ## 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. # Creates a subscription on the server Put/v2/tenants/{tenantId}/projects/{projectId}/subscriptions/{sub} Creates queues and routing keys so that you can publish and subscribe to a queue(s). `{sub}` must not contain `builtin_` or `custom_` as these are reserved words SecurityAPI KeyHeader parameter nameAuthorization AWS Cognito Authorizer. Since there are no custom scopes the ID Token must be used for authorization Header parametersContent-TypestringRequired Path parameterstenantIdstringRequired The RapidIdentity Cloud tenant id projectIdstringRequired The project id this service belongs (i.e. sm, idhub, ric) substringRequired The queue name. Body parameters Utilized to generate the routing key for the queue. This format is `tenants/{tenantId}/projects/{projectId}/topics/{sub}`. `{sub}` must not contain `builtin_` or `custom_` as these are reserved words topic An example for a topic ```json { "topic": "tenants/1234/projects/ri/topics/alerts" } ``` objecttopicstring Required Responses200 An instance of a Subscription is returned HeadersContent-Typestring Content-Lengthstring Cache-Controlstring objectnamestring topicstring 400 An issue with how the request was formatted HeadersContent-Typestring Content-Lengthstring Cache-Controlstring Expand Allobjecterrorobject The error message description errors Array of object The more detailed information about the error message objectdomainstring The service where the error occured. i.e. sm, idhub reasonstring The reason for the error based on Identity Automation common error codes messagestring Additional details about the error locationTypestring The specific location where the error occurred. i.e. parameter, content locationstring The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage codestring The http status code messagestring Additional details about the error 401 The request is not authorized. Ensure you are using an ID Token in your request and it is not expired HeadersContent-Typestring Content-Lengthstring Cache-Controlstring Expand Allobjecterrorobject The error message description errors Array of object The more detailed information about the error message objectdomainstring The service where the error occured. i.e. sm, idhub reasonstring The reason for the error based on Identity Automation common error codes messagestring Additional details about the error locationTypestring The specific location where the error occurred. i.e. parameter, content locationstring The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage codestring The http status code messagestring Additional details about the error 403 The authorization token does not have access to the RapidIdentity Cloud Tenant. Ensure the tenantId used for authentication is the same one used in this request. HeadersContent-Typestring Content-Lengthstring Cache-Controlstring Expand Allobjecterrorobject The error message description errors Array of object The more detailed information about the error message objectdomainstring The service where the error occured. i.e. sm, idhub reasonstring The reason for the error based on Identity Automation common error codes messagestring Additional details about the error locationTypestring The specific location where the error occurred. i.e. parameter, content locationstring The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage codestring The http status code messagestring Additional details about the error 503 Unable to connect to pubsub service HeadersContent-Typestring Content-Lengthstring Cache-Controlstring Expand Allobjecterrorobject The error message description errors Array of object The more detailed information about the error message objectdomainstring The service where the error occured. i.e. sm, idhub reasonstring The reason for the error based on Identity Automation common error codes messagestring Additional details about the error locationTypestring The specific location where the error occurred. i.e. parameter, content locationstring The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage codestring The http status code messagestring Additional details about the error