openapi: 3.2.0 info: title: Elastic SIP Trunk Credentials API description: This document provides a detailed user guide and reference documentation on the Sinch Elastic SIP Trunk API. version: 1.0.0 license: name: MIT url: https://www.sinch.com/toc contact: email: support@sinch.com name: support at sinch servers: - url: https://elastic-trunking.api.sinch.com security: - Basic: [] - OAuth2.0: [] tags: - name: Credentials description: The Credentials endpoint has operations that allow you to manage credentials within a credential list. paths: /v1/projects/{projectId}/credentialLists/{credentialListId}/credentials/{username}: delete: tags: - Credentials summary: Delete a credential operationId: deleteCredential parameters: - $ref: '#/components/parameters/ProjectId' - name: credentialListId in: path required: true description: The ID of the credential list entry. schema: type: string - name: username in: path required: true description: The username of the credential. schema: type: string responses: '204': description: No Content x-codeSamples: - lang: Node.js source: "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n // The credential list ID that contains the credential to delete\n const credentialListId = 'CREDENTIAL_LIST_ID';\n // The username of the credential to delete\n const credentialUsername = 'CREDENTIAL_USERNAME';\n\n const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n try {\n await sinch.elasticSipTrunking.credentialLists.deleteCredential({\n id: credentialListId,\n username: credentialUsername,\n });\n console.log(`✅ Successfully deleted the credential with username ${credentialUsername} from credential list ${credentialListId}.`);\n } catch (err) {\n console.error(`❌ Failed to delete the credential with username ${credentialUsername} from credential list ${credentialListId}:`);\n console.error(err);\n }\n}\n\nmain();\n" components: parameters: ProjectId: name: projectId in: path required: true description: The `projectId` is a required parameter you must include when making any API calls. You can find your project ID on your [Build dashboard](https://dashboard.sinch.com). schema: type: string example: 3acb7ae1-cf3d-4112-ba5e-3a9d8c71cd47 securitySchemes: Basic: type: http description: To use basic authentication, use your Access Key ID as your username and your Access Key Secret as your password. To read about more basic authentication, see the [Basic Authentication](https://developers.sinch.com/docs/est/api-reference/est#basic) section. scheme: basic OAuth2.0: type: oauth2 description: To use OAuth 2.0 authentication, use your Access Key ID and Access Key Secret to obtain your bearer token. For detailed instructions on how to do this, see the [OAuth Authentication](https://developers.sinch.com/docs/est/api-reference/est#oauth) section. flows: clientCredentials: tokenUrl: https://auth.sinch.com/oauth2/token scopes: {}