components: schemas: Attachment: properties: attachmentId: description: Unique identifier of the attachment. example: d1c7ccbf-919d-462f-8587-dec95a1b11ee type: string createTime: description: Create time of the request. ISO date time format in UTC without timezone offset. example: '2021-11-03T14:30:03' type: string fileName: description: Human readable name of the attachment. example: sender_id_registration_form.docx type: string mimeType: description: MIME type of the attachment file. example: application/vnd.openxmlformats-officedocument.wordprocessingml.document type: string updateTime: description: Update time of the request. ISO date time format in UTC without timezone offset. example: '2021-11-03T14:30:03' type: string uploadStatus: description: Status of the file uploaded enum: - 'COMPLETED' - 'WAITING' - 'FAILED' x-enumDescriptions: COMPLETED: Attachment successfully uploaded and linked to the registration WAITING: Attachment processing is still ongoing. FAILED: Attachment uploading has failed for any reason. example: 'COMPLETED' type: string type: object AttachmentDefinition: properties: description: description: Attachment description example: This document is required for any Third party registration in MK local. type: string id: description: Attachment Definition Id example: '43342642354352344' type: string mandatory: description: whether the attachment is mandatory in this policy type: boolean template: description: Whether the attachment contains a template or not. Templates can be downloaded with /template endpoint type: boolean title: description: Attachment title example: Third Party Authority Form type: string type: object CallbackConfigurationResponse: properties: hmacSecret: description: The HMAC secret used for hashing the callback body using the HMAC-SHA1 algorithm - and for creating the X-Sinch-Signature header. example: d1c7ccbf-919d-462f-8587-dec95a1b11ee type: string projectId: type: string type: object CallbackConfigurationUpdateBody: properties: hmacSecret: description: The HMAC secret to be updated for the specified project example: d1c7ccbf-919d-462f-8587-dec95a1b11ee type: string type: object CallbackEventBody: description: Callback Event Object body properties: comment: description: Additional comment related to the latest status change example: Hi, the NOC letter contains phone numbers, and this is not allowed. Please have this updated to proceed forward. Regards, XX type: string eventId: description: The ID of the event. example: ee34ccbf-919d-462f-8587-dec95a1b11ee type: string eventType: description: The type of the event. enum: - 'REGISTRATION_STATUS_CHANGE' x-enumDescriptions: REGISTRATION_STATUS_CHANGE: Event informs about a registration status change. example: 'REGISTRATION_STATUS_CHANGE' type: string projectId: description: The ID of the project to which the event belongs. example: aad4ccbf-919d-462f-8587-dec95a1b11b0 type: string resourceId: description: Corresponds to the registration id example: 01hh51s80tpvjy7pe0mt6nd7at type: string resourceType: description: Type of the registration id enum: - 'ALPHANUMERIC_SENDER_ID' x-enumDescriptions: ALPHANUMERIC_SENDER_ID: Alpha sender IDs example: 'ALPHANUMERIC_SENDER_ID' type: string status: description: The new status of the registration enum: - 'IN_QUEUE' - 'IN_PROGRESS' - 'APPROVED' - 'REJECTED' - 'PENDING' - 'ON_HOLD' - 'PENDING_APPROVAL' - 'PENDING_ATTACHMENTS' x-enumDescriptions: IN_QUEUE: Registration has been successfully submitted, but it is waiting for support. IN_PROGRESS: Registration is being processing by Sinch. APPROVED: Registration has been approved and sender Id has been provisioned for the customer. REJECTED: Registration has been rejected. A comment should be present in the logs with the reason. PENDING: Registration must be updated by the customer. Please check the registration logs to understand the reason. ON_HOLD: Registration is on hold for any reason. Please check the comments in the logs. PENDING_APPROVAL: For those policies with MANUAL price, Account Managers must approve the operation. Until registration has the approval it will stay in this state. PENDING_ATTACHMENTS: Registration has been submitted, but at least one mandatory attachment must be provided. example: 'IN_QUEUE' type: string timestamp: description: The date and time when the callback was created and added to the callbacks queue. It's crucial to note that the callback service doesn't guarantee delivery order; hence, this timestamp serves as the source of truth for sequencing. example: '2023-06-06T07:45:27.785357' type: string type: object ChainedSpecialCondition: properties: answer: description: Answer to previous question example: 'No' type: string chainedSpecialConditions: description: A chained special conditions that contains an answer of a previous question, a new question/answers if needed, a policy id if there are no more questions items: $ref: '#/components/schemas/ChainedSpecialCondition' type: array policyId: description: In markets without special conditions, the policy id is here. This field will be ignored (not exist) if there are chained special conditions example: '43342642354352344' type: string prompt: description: A question to be answered with the chained special conditions. This field will be ignored (not exist) if there are not chained special conditions example: Is this brand registered as a local legal entity in this market? type: string type: object ErrorDetails: type: object GetRegistrationResponse: description: Registration content properties: attachments: description: Files attached to this registration items: $ref: '#/components/schemas/Attachment' type: array callbackUrl: description: Webhook URL to specify an endpoint for delivery of notifications about registration updates example: senderid.registrations.api.sinch.com type: string createTime: description: Creation time of the request. ISO date time format in UTC without timezone offset. example: '2021-11-03T14:30:03' type: string etaDate: description: Expected date of the registration approval. ISO date format. example: '2024-11-03' type: string id: description: Unique registration identifier. example: d1c7ccbf-919d-462f-8587-dec95a1b11ee type: string logs: description: Detailed history of the status changes this registration went through items: $ref: '#/components/schemas/LogEntry' type: array notificationContacts: description: Email addresses that will be notified of any status changes of the registration. example: - jane.doe@example.com - john.doe@example.com items: type: string type: array owner: description: Display name of the user that created the registration. example: Jane Doe type: string policyId: description: Unique identifier of the policy for this registration. example: d1c7ccbf-919d-462f-8587-dec95a1b11ee type: string price: $ref: '#/components/schemas/Pricing' registrationType: description: Specify the senderId type enum: - 'ALPHANUMERIC_SENDER_ID' - 'LONG_NUMBER' x-enumDescriptions: ALPHANUMERIC_SENDER_ID: Alpha sender IDs LONG_NUMBER: Long Numbers for SMS example: 'ALPHANUMERIC_SENDER_ID' format: enum type: string requestDetails: description: Details of the sender ids to be registered. Details depend on the specific market requirements defined in the policy. items: $ref: '#/components/schemas/RequestDetails' type: array status: description: Status of the registration. enum: - 'DRAFT' - 'IN_QUEUE' - 'IN_PROGRESS' - 'APPROVED' - 'REJECTED' - 'PENDING' - 'ON_HOLD' - 'PENDING_APPROVAL' - 'PENDING_ATTACHMENTS' x-enumDescriptions: DRAFT: Registration not submitted by the customer. This functionality is not available through Public API, but it is possible to retrieve a registration created in the Sinch Customer Dashboard under the same project Id. IN_QUEUE: Registration has been successfully submitted, but it is waiting for support. IN_PROGRESS: Registration is being processing by Sinch. APPROVED: Registration has been approved and sender Id has been provisioned for the customer. REJECTED: Registration has been rejected. A comment should be present in the logs with the reason. PENDING: Registration must be updated by the customer. Please check the registration logs to understand the reason. ON_HOLD: Registration is on hold for any reason. Please check the comments in the logs. PENDING_APPROVAL: For those policies with MANUAL price, Account Managers must approve the operation. Until registration has the approval it will stay in this state. PENDING_ATTACHMENTS: Registration has been submitted, but at least one mandatory attachment must be provided. example: 'IN_QUEUE' type: string tags: description: User tags used for the registration. Tag have to start from '#' and contains only alphanumerics and dashes. example: ["#myTag1", "#myTag2"] items: type: string type: array updateTime: description: Update time of the request. ISO date time format in UTC without timezone offset. example: '2021-11-03T14:30:03' type: string type: object InternalRestError: properties: code: format: int32 type: integer details: items: $ref: '#/components/schemas/ErrorDetails' type: array message: type: string status: type: string type: object ListAvailableMarketsResponse: description: List of market codes available for registration under request filters. properties: markets: description: List of countries that matches with the request criteria. items: $ref: '#/components/schemas/MarketDescription' type: array type: object ListMarketVersionsResponse: properties: marketVersions: description: List of Market versions that matches with the request criteria. items: $ref: '#/components/schemas/MarketVersion' type: array nextPageToken: description: next token to be used to retrieve more markets example: CgptYXJrZXRDb2RlEk4KRnR5cGUuZ29vZ2xlYXBpcy5jb20vc2luY2gubnVtcmVnLnBvbGljeS52MWFscGhhMi5NYXJrZXRWZXJzaW9uUGFnZU1hcmsSBAoCS1o= type: string totalSize: description: Total Number of markets. example: 50 format: int32 type: integer type: object ListRegistrationsResponse: properties: nextPageToken: description: Page token that can be used to retrieve next page of registrations if they exist. Will be empty if next page does not exist type: string registrations: description: List of registrations items: $ref: '#/components/schemas/GetRegistrationResponse' type: array totalSize: description: Total count of registrations matching provided search criteria format: int32 type: integer type: object LogEntry: properties: createTime: description: Create time of this log entry. ISO date time format in UTC example: '2021-11-03T14:30:03' type: string message: description: Optional message with details of the registration status update. Can contain information provided by the agent handling the request. example: Please update the attachment connected to your request. type: string registrationState: description: State of the registration after this entry was created example: 'PENDING' type: string type: object MarketDescription: description: Market description contains for each market, the market name and the market ISO Code (2 characters) properties: marketCode: description: ISO market code (ex. 'IT', 'AU', 'AE', etc.) example: AE pattern: ^[A-Z]{2}$ type: string marketName: description: Market Name example: United Arab Emirates type: string type: object MarketVersion: description: Each Market Version object contains id, market code, registration type, market status and a set of special conditions. properties: createTime: description: Creation time of this major/minor market version. example: '2023-09-17 06:22:34.372747' format: date-time type: string id: description: Market Version Id. example: ddede333432ededed2 type: string majorVersion: description: Major version of the policy. Indicates market requirement changes that may require resubmitting requests in progress. example: 1 format: int32 type: integer marketCode: description: ISO country code. example: 'AU' type: string minorVersion: description: Minor version of the policy. Indicates market requirement changes that do not require resubmitting requests in progress. example: 0 format: int32 type: integer registrationType: description: Type of SenderID referenced by this market. enum: - 'ALPHANUMERIC_SENDER_ID' - 'LONG_NUMBER' x-enumDescriptions: ALPHANUMERIC_SENDER_ID: Alpha sender IDs LONG_NUMBER: Long Numbers for SMS example: 'ALPHANUMERIC_SENDER_ID' format: enum type: string specialConditions: $ref: '#/components/schemas/SpecialCondition' status: description: Market status, it can be active or disabled enum: - 'ACTIVE' - 'DISABLED' x-enumDescriptions: ACTIVE: Market is available to request sender Ids. DISABLED: Market has been deactivated and sender Ids cannot be requested. example: 'ACTIVE' format: enum type: string type: object Policy: description: Policy response, contains the fields and attachments required, multi type configuration, status and fees properties: attachments: description: Attachment Definition items: $ref: '#/components/schemas/AttachmentDefinition' type: array fees: deprecated: true description: True if policy registration has any fees associated type: boolean id: description: Policy Version Id example: '43342642354352344' type: string jsonPolicy: $ref: '#/components/schemas/Policy_JsonPolicy' policyMultiType: description: Indicates whether the policy accepts single or multi sender id requested in each registration process enum: - 'SINGLE' - 'MULTI_SENDER' x-enumDescriptions: SINGLE: Only one sender Id is allowed per registration. MULTI_SENDER: Up to 50 sender Ids are allowed per registration. They can be included in the senderIdDetails array (one object per sender Id) example: 'SINGLE' format: enum type: string policyStatus: description: Policy status enum: - 'ENABLED' - 'DISABLED' x-enumDescriptions: ENABLED: Policy is in use. DISABLED: Policies that for any reason has been deactivated. There are several reasons to do so, but they are mainly due to changes in the regulations, which require some manual intervention. example: 'ENABLED' format: enum type: string price: $ref: '#/components/schemas/Policy_Pricing' statusDisclaimer: description: Contains disclaimer for disabled policies. Empty if policy is ACTIVE example: Policy has been disabled as Registrations for these market conditions are now dynamic. type: string type: object Policy_JsonPolicy: properties: companyDetailsTemplate: description: Policy section related to company details type: object contactPersonTemplate: description: Policy section related to contact person details type: object senderIdTemplate: description: Policy section related to sender ID details type: object type: object Policy_Pricing: properties: mode: description: "Type of policy pricing." enum: - 'SUBSCRIBED' - 'MANUAL' - 'NONE' x-enumDescriptions: SUBSCRIBED: "policy which has automatic fees assigned: setup fee or/and recurrent fee" MANUAL: "policy contains fees associated in the market, those are managed and approved by customer's account manager" NONE: "no fee associated" example: 'SUBSCRIBED' format: enum type: string subscription: $ref: '#/components/schemas/Pricing_Subscription' type: object Pricing: properties: currency: description: Currency of the fees example: USD type: string frequency: description: Recurrent subscription period in month, 0 if no subscription fees example: 1 format: int32 type: integer recurrentFeeAmount: description: Recurrent subscription fee amount example: '2' type: string setupFeeAmount: description: One time setup fee amount example: '5' type: string type: object Pricing_Subscription: properties: currency: description: Currency of user type: string frequency: description: Frequency of recurrent fee, is 0 when there is not recurrent fee. The number ranges from 0 to 12, where 1 indicates monthly payments and 12 indicates yearly payments format: int32 type: integer recurrentFeeAmount: description: Amount of recurrent fee type: string setupFeeAmount: description: Amount of setup fee type: string type: object RegistrationCreateBody: required: - policyId properties: callbackUrl: description: Webhook URL to specify an endpoint for delivery of notifications about registration updates example: senderid.registrations.api.sinch.com type: string notificationContacts: description: Email addresses that will be notified of any status changes of the registration. example: - jane.doe@example.com - john.doe@example.com items: type: string type: array policyId: description: Policy id that applies the registration. example: d1c7ccbf-919d-462f-8587-dec95a1b11ee type: string requestDetails: description: Details of the sender ids to be registered. Details depend on the specific market requirements defined in the policy. items: $ref: '#/components/schemas/RequestDetails' type: array tags: description: User tags used for the registration. Tag have to start from '#' and contains only alphanumerics and dashes. example: ["#myTag1", "#myTag2"] items: type: string type: array type: object RegistrationUpdateBody: properties: callbackUrl: description: Webhook URL to specify an endpoint for delivery of notifications about registration updates example: senderid.registrations.api.sinch.com type: string notificationContacts: description: Email addresses that will be notified of any status changes of the registration. example: - jane.doe@example.com - john.doe@example.com items: type: string type: array requestDetails: description: Details of the sender ids to be registered. Details depend on the specific market requirements defined in the policy. items: $ref: '#/components/schemas/RequestDetails' type: array tags: description: User tags used for the registration. Tag have to start from '#' and contains only alphanumerics and dashes. example: ["#myTag1", "#myTag2"] items: type: string type: array type: object RequestDetails: properties: additionalDetails: description: Additional details required for this registration, e.g. company details or contact information. Schema and content depend on the specific market requirements defined in the policy items: type: object type: array senderIdDetails: description: Data related to the sender id values requested in this registration. Schema and content depend on the specific market requirements defined in the policy items: type: object type: array type: object RestError: properties: error: $ref: '#/components/schemas/InternalRestError' type: object SpecialCondition: properties: chainedSpecialConditions: description: A chained special conditions that contains an answer of a previous question, a new question/answers if needed, a policy id if there are no more questions items: $ref: '#/components/schemas/ChainedSpecialCondition' type: array policyId: description: In markets without special conditions, the policy id is here. This field will be ignored (not exist) if there are chained special conditions example: '43342642354352344' type: string prompt: description: A question to be answered with the chained special conditions. This field will be ignored (not exist) if there are not chained special conditions example: 'Is this brand registered as a local legal entity in this market?' type: string type: object securitySchemes: OAuth2: description: The username and password are your Key ID and Key Secret from the Access keys section in the Sinch Customer Dashboard. Exchange these for a bearer token (access token). flows: clientCredentials: scopes: read: read write: write tokenUrl: https://auth.sinch.com/oauth2/token type: oauth2 hmacAuth: type: http scheme: hmac description: Used for hashing callbacks. Please refer to the callback-configuration endpoints for more information. externalDocs: description: All endpoints available under this API require Bearer token authentication. Please check oauth api documentation if you need more details. url: https://developers.sinch.com/docs/numbers/api-reference/authentication/oauth/ info: description: This API describes the set of endpoints available to get each market requirements and create registration for sender IDs. \nThe list of endpoints allows to create, update and delete a registration and also get the current state.\nFor each market, customers can check the different requirements depending on the new sender id scope, and also download templates to fill in for the registrations.\n Interested in this API? Please, reach out to your Account Manager for more info. title: Sinch Sender ID Registrations API version: 1.0.0 contact: name: Support url: https://www.sinch.com email: Support@sinch.com license: name: MIT url: https://www.sinch.com/toc openapi: 3.0.3 paths: /v1/projects/{projectId}/callback-configuration: get: description: The endpoint receives as path param project id. If the project exists, the details of the callback configuration are returned. operationId: getCallbackConfiguration parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/CallbackConfigurationResponse' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: The project id introduced does not exist.' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - read summary: Get a callback configuration by project id. tags: - callback-configuration put: description: The endpoint updates the callback configuration with specified project ID operationId: updateCallbackConfiguration parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CallbackConfigurationUpdateBody' responses: '200': content: application/json: schema: $ref: '#/components/schemas/CallbackConfigurationResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'BAD_REQUEST: Project validation error' '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: The project id introduced does not exist.' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - write summary: Update a callback configuration tags: - callback-configuration /v1/projects/{projectId}/markets/availability: get: description: The endpoint retrieves the list of market codes available for alphanumeric registration. Market code is an optional query param, if used, the response will contain a list with the same market code if it is available; the list will be empty if it is not. operationId: listAvailableMarkets parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string - in: query name: marketCode description: Filter by ISO market code (ex. 'IT', 'AU', 'KW', etc.) schema: type: string pattern: '^[A-Z]{2}$' example: 'MK' - in: query name: language description: 'Language used to print country names. Default: en' schema: type: string pattern: '^[a-z]{2}$' example: 'es' - in: query name: registrationType description: 'Type of SenderID to be registered. Options: ALPHANUMERIC_SENDER_ID for alpha registration, LONG_NUMBER for long number sms services registration' schema: format: enum type: string enum: ['ALPHANUMERIC_SENDER_ID', 'LONG_NUMBER'] default: 'ALPHANUMERIC_SENDER_ID' responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListAvailableMarketsResponse' description: OK '403': description: Customer has no authorization for this API '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - read summary: Get list of market codes available for alphanumeric request tags: - markets /v1/projects/{projectId}/markets/details: get: description: 'The endpoint will return the markets in active status according to the query parameters: market code and registration type' operationId: listMarketVersions parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string - in: query name: marketCode description: Filter by ISO market code (ex. 'IT', 'AU', 'KW', etc.) schema: type: string pattern: '^[A-Z]{2}$' example: 'MK' - in: query name: activePolicies description: 'Filter to enable viewing only active policies in markets. Default: false, returns all policies within market' schema: type: boolean default: false - in: query name: pageToken description: 'Add token from previous query if needed to retrieve more markets' schema: type: string - in: query name: pageSize description: 'Number of markets per page' schema: format: int32 type: integer - in: query name: registrationType description: 'Type of SenderID to be registered. Options: ALPHANUMERIC_SENDER_ID for alpha registration, LONG_NUMBER for long number sms services registration' schema: format: enum type: string enum: ['ALPHANUMERIC_SENDER_ID', 'LONG_NUMBER'] default: 'ALPHANUMERIC_SENDER_ID' responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListMarketVersionsResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/RestError' description: Token not valid security: - OAuth2: - read summary: Get list of market versions in active status. tags: - markets /v1/projects/{projectId}/policies/{policyId}: get: description: Returns the whole configuration of a given policyId, including multi configuration, fields, sections and attachments. operationId: GetPolicy parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string - in: path description: Id of the policy name: policyId required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Policy' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: Policy Id introduced does not exist.' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - read summary: Get details of a policy from policyId tags: - policies /v1/projects/{projectId}/policies/{policyId}/attachments/{attachmentId}/template: get: description: "Download a policy template. Use this enpdoint to download the template for those policy attachments which template value is true." operationId: downloadTemplate parameters: - description: Customer's project id in: path name: projectId required: true schema: example: 'eeew32344324edewe2e3' type: string - description: Policy id requested in: path name: policyId required: true schema: example: '43342642354352344' type: string - description: Attachment definition id requested in: path name: attachmentId required: true schema: example: '324234762423034240' type: string responses: '200': content: application/octet-stream: schema: format: binary type: string description: Request Successful with binary file returned in octet stream '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: Policy/template not found security: - OAuth2: - read summary: Download a policy template file tags: - policies /v1/projects/{projectId}/registrations: get: description: The endpoint receives as path param project id. Supports optional query parameters to narrow the results and cursor based pagination. operationId: listRegistrations parameters: - description: Customer's project id in: path name: projectId required: true schema: type: string - in: query name: registrationState description: 'Status of the registration. ' schema: type: string enum: ['DRAFT', 'IN_QUEUE', 'IN_PROGRESS', 'APPROVED', 'REJECTED', 'PENDING', 'ON_HOLD', 'PENDING_APPROVAL', 'PENDING_ATTACHMENTS'] example: 'IN_QUEUE' - in: query name: tags description: 'User tags used for the registration. Tag have to start from '#' and contains only alphanumerics and dashes.' schema: items: type: string type: array example: ["#tag1", "#tag2"] - in: query name: marketCode description: Filter by ISO market code (ex. 'IT', 'AU', 'KW', etc.) schema: type: string pattern: '^[A-Z]{2}$' example: 'MK' - in: query name: createDateFrom description: 'Date of registration creation, ISO 8601 format. Returns registrations created after given date.' schema: type: string example: '2024-11-03' - in: query name: createDateTo description: 'Date of registration creation, ISO 8601 format. Returns registrations created before given date.' schema: type: string example: '2024-11-03' - in: query name: updateDateFrom description: 'Date of registration update, ISO 8601 format. Returns registrations update after given date.' schema: type: string example: '2024-11-03' - in: query name: updateDateTo description: 'Date of registration update, ISO 8601 format. Returns registrations updated before given date.' schema: type: string example: '2024-11-03' - in: query name: senderId description: 'Sender ID value.' schema: type: string example: 'senderID' - in: query name: orderBy description: "Ordering of the results: field name with an optional order separated by a comma. Fields that support ordering are 'id', 'status', 'senderId', 'createDate', 'updateDate' with possible ordering 'desc' or 'asc'" schema: type: string example: 'senderId,asc' - in: query name: pageSize description: 'Size of the page to be returned.' schema: format: int32 type: integer example: 100 - in: query name: pageToken description: 'Page token to request subsequent pages when using pagination. This should be the value generated by a system in a previous list request.' schema: type: string - in: query name: registrationType description: 'Registration type for market used in registration is for. There are different markets available depending on this type' schema: format: enum type: string enum: [ 'ALPHANUMERIC_SENDER_ID', 'LONG_NUMBER' ] default: 'ALPHANUMERIC_SENDER_ID' responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListRegistrationsResponse' description: OK '403': description: Customer has no authorization for this API '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - read summary: List registrations tags: - registrations post: callbacks: Registration Status Update: '{$callback_url}': post: description: 'Callback notification, these notifications are sent when registration POST operation contains a callbackUrl. Events are sent at any registration status update.' operationId: postCallbackEvent requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CallbackEventBody' parameters: - in: header name: X-Sinch-Signature description: 'Contains the request payload hashed using customers HMAC secret. To successfully un-hash the content the json properties must be ordered alphabetically.' schema: type: string responses: '200': description: OK '4XX': description: Customer has refused callback event for any reason. summary: Event notification security: - hmacAuth: [] description: The endpoint creates a registration with specified policyId and registration's Data. The registration will be validated against the selected policy before submission. After this endpoint gets a 200, the registration will be in IN_QUEUE state, and will be editable. For those registrations that need attachments, they must be provided in a separated endpoint. operationId: createRegistration parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RegistrationCreateBody' responses: '200': content: application/json: schema: $ref: '#/components/schemas/GetRegistrationResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'BAD_REQUEST: Registration validation error' '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: Policy not found' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - write summary: Create a new registration tags: - registrations /v1/projects/{projectId}/registrations/{registrationId}: delete: description: The endpoint receives as path param project id and registration ID. If the registration exists under the specified project id and the registration is in DRAFT, IN QUEUE or PENDING status, the registration will be deleted. Only DRAFT, IN QUEUE or PENDING registrations can be deleted. operationId: deleteRegistration parameters: - in: path name: projectId description: Customer's project id required: true schema: type: string - in: path description: Id of the registration to be deleted name: registrationId required: true schema: type: string responses: '200': content: {} description: OK '400': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'BAD_REQUEST: Registration is not in DRAFT, IN QUEUE or PENDING status.' '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: The registration id introduced does not exist.' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - write summary: Delete a registration by registration ID tags: - registrations get: description: The endpoint receives as path param project id and registration id. If the registration exists under the specified project id, the details of the registration are returned. operationId: getRegistration parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string - in: path description: Id of the registration name: registrationId required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/GetRegistrationResponse' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: The registration id introduced does not exist.' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - read summary: Get a registration by registration ID tags: - registrations put: description: The endpoint updates the registration with specified ID operationId: updateRegistration parameters: - in: path description: Customer's project id name: projectId required: true schema: type: string - in: path description: Id of the registration to be updated name: registrationId required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RegistrationUpdateBody' responses: '200': content: application/json: schema: $ref: '#/components/schemas/GetRegistrationResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'BAD_REQUEST: Registration validation error' '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'NOT_FOUND: The registration id introduced does not exist.' '500': content: application/json: schema: $ref: '#/components/schemas/RestError' description: 'INTERNAL: Internal server error. Typically, a server bug.' security: - OAuth2: - write summary: Update a registration tags: - registrations /v1/projects/{projectId}/registrations/{registrationId}/attachments/{attachmentId}: get: operationId: downloadRegistrationAttachment description: Download attachments previously added to the registration. parameters: - description: Customer's project id in: path name: projectId required: true schema: example: eeew32344324edewe2e3 type: string - description: Registration id requested in: path name: registrationId required: true schema: example: 234235425jhl21132424lf type: string - description: Attachment definition id requested in: path name: attachmentId required: true schema: example: '324234762423034240' type: string responses: '200': content: application/octet-stream: schema: format: binary type: string description: Request Successful with binary file returned in octet stream '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: registration/document not found security: - OAuth2: - read summary: Download a document previously attached to the registration tags: - registrations post: operationId: uploadRegistrationAttachment description: Through this endpoint, attachments can be added to registrations. The required attachments for each registration can be retrieved from the get policy endpoint. parameters: - description: Customer's project id in: path name: projectId required: true schema: example: eeew32344324edewe2e3 type: string - description: Registration id requested in: path name: registrationId required: true schema: example: 234235425jhl21132424lf type: string - description: Attachment definition id requested in: path name: attachmentId required: true schema: example: '324234762423034240' type: string requestBody: content: multipart/form-data: schema: format: binary type: string description: File content body responses: '200': description: Document uploaded successfully '400': content: application/json: schema: $ref: '#/components/schemas/RestError' description: Registration status is not valid for including attachments '404': content: application/json: schema: $ref: '#/components/schemas/RestError' description: registration/document not found '413': content: application/json: schema: $ref: '#/components/schemas/RestError' description: Document is too large to upload security: - OAuth2: - write summary: Upload a document and attach it to a registration tags: - registrations servers: - description: Production server url: https://senderid.registrations.api.sinch.com - description: Staging server url: https://senderid.numbers-registration.staging.sinch.com tags: - description: |- You can set up callback URLs to receive event notifications when your registration status is updated. When delivering events the order is not guaranteed (for example, a failed event scheduled for retry will not block other events that were queued). The client's callback handler must implement the state machine that can decide what to do with unexpected events, for example, "old" events or invalid state transitions. In these cases the handler could use the API to GET the latest state for the resource. The callback handler is expected to "ingest" the event and respond with 200 OK. The domain-specific business logic and processes should be executed outside of the callback request, as internal asynchronous jobs. An HMAC encrypted secret is used for hashing the payload and sending the hashed String via the X-Sinch-Signature header - that you can use to validate that an incoming request is secure. Hmac secret value can be checked with GET endpoint, and it can be updated with PUT endpoint. name: callback-configuration x-displayName: Callback configuration - description: Operations related to get market availability and different options based on usage. name: markets x-displayName: Markets - description: Operation related to get policy required information, as fields, validations or attachments. name: policies x-displayName: Policies - description: Submit, update, list and get registration info. name: registrations x-displayName: Registrations x-explorer-enabled: false x-samples-languages: - curl - java - csharp - node - php