openapi: 3.0.3 info: title: Number Recycling version: 1.0.0 description: 'Check whether the subscriber behind a mobile phone number has changed since a date you specify, for example the date the number was registered on your service. Use it to stop sending one-time codes, account notices or payments to someone who received a recycled number. Follows the CAMARA Number Recycling API (GSMA Open Gateway). The operator is chosen from the number''s country code: Algeria (+213), Iraq (+964), Kuwait (+965), Maldives (+960), Oman (+968), Palestine (+970, +972), Qatar (+974) and Tunisia (+216).' servers: - url: https://api.ooredoo.com description: Ooredoo API gateway tags: - name: Authentication - name: Number Recycling paths: /oauth/v1/token: post: tags: - Authentication summary: Get an access token description: Exchange your app's consumer key and secret for an access token (OAuth 2.0 client credentials). operationId: getToken requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - grant_type - client_id - client_secret properties: grant_type: type: string enum: - client_credentials example: client_credentials client_id: type: string description: Consumer key of your app client_secret: type: string description: Consumer secret of your app responses: '200': description: Access token content: application/json: schema: type: object properties: access_token: type: string token_type: type: string example: Bearer expires_in: type: integer example: 3599 '401': description: Invalid client credentials security: [] /number-recycling/v1/check: post: tags: - Number Recycling summary: Check if a number has been recycled since a date operationId: checkNumberRecycling parameters: - name: x-correlator in: header required: false description: Correlation ID, echoed back in the response schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CheckRequest' responses: '200': description: Whether the number has changed subscriber since the date content: application/json: schema: $ref: '#/components/schemas/CheckResponse' '400': description: 'Invalid request: a required field is missing or malformed' content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Missing or invalid access token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: The token does not carry the scope this operation needs content: application/json: schema: $ref: '#/components/schemas/Error' '429': description: Quota exceeded content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' '503': description: Operator backend unavailable content: application/json: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] components: securitySchemes: BearerAuth: type: http scheme: bearer description: Access token from the token endpoint schemas: Error: type: object properties: status: type: integer code: type: string message: type: string CheckRequest: type: object required: - phoneNumber - specifiedDate properties: phoneNumber: type: string pattern: ^\+[1-9][0-9]{4,14}$ description: Mobile number in E.164 format, with the leading + example: '+97450000000' specifiedDate: type: string format: date-time description: Check for a change of subscriber after this date and time (RFC 3339) example: '2025-01-01T00:00:00Z' CheckResponse: type: object required: - phoneNumberRecycled properties: phoneNumberRecycled: type: boolean description: true if the number has been assigned to a different subscriber after specifiedDate example: false