openapi: 3.1.0 info: title: Twilio SendGrid Provisioning Account SSO Certificates API summary: The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. description: 'The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).' termsOfService: https://www.twilio.com/legal/tos contact: name: Twilio SendGrid Support url: https://support.sendgrid.com/hc/en-us license: name: MIT url: https://code.hq.twilio.com/twilio/sendgrid-oas/blob/main/LICENSE version: 1.0.0 x-sendgrid: libraryPackage: account_provisioning servers: - url: https://api.sendgrid.com description: for global users and subusers - url: https://api.eu.sendgrid.com description: for EU regional subusers security: - BearerAuth: [] tags: - name: SSO Certificates description: Twilio SendGrid Single Sign-On Certificate Operations paths: /v3/sso/certificates: post: operationId: CreateSsoCertificate summary: Create an SSO Certificate tags: - SSO Certificates description: '**This endpoint allows you to create an SSO certificate.**' requestBody: content: application/json: schema: type: object description: '' properties: public_certificate: type: string description: This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. enabled: type: boolean description: Indicates if the certificate is enabled. integration_id: type: string description: An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the "Get All SSO Integrations" endpoint. required: - public_certificate - integration_id example: public_certificate: enabled: false integration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SsoCertificateBody' examples: response: value: public_certificate: id: 66138975 not_before: 1621289880 not_after: 1621289880 intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 '400': $ref: '#/components/responses/Sso400' '401': $ref: '#/components/responses/Sso401' '403': $ref: '#/components/responses/Sso403' '429': $ref: '#/components/responses/Sso429' '500': $ref: '#/components/responses/Sso500' /v3/sso/certificates/{cert_id}: parameters: - name: cert_id in: path required: true schema: type: string get: operationId: GetSsoCertificate summary: Get an SSO Certificate tags: - SSO Certificates description: '**This endpoint allows you to retrieve an individual SSO certificate.**' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SsoCertificateBody' examples: response: value: public_certificate: id: 66138975 not_before: 1621289880 not_after: 1621289880 intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 '400': $ref: '#/components/responses/Sso400' '401': $ref: '#/components/responses/Sso401' '403': $ref: '#/components/responses/Sso403' '429': $ref: '#/components/responses/Sso429' '500': $ref: '#/components/responses/Sso500' patch: operationId: UpdateSsoCertificate summary: Update SSO Certificate tags: - SSO Certificates description: '**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate''s ID from the response provided by the "Get All SSO Integrations" endpoint.' requestBody: content: application/json: schema: type: object properties: public_certificate: type: string description: This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. enabled: type: boolean description: Indicates whether or not the certificate is enabled. integration_id: type: string description: An ID that matches a certificate to a specific IdP integration. example: public_certificate: enabled: false intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SsoCertificateBody' examples: response: value: public_certificate: id: 66138975 not_before: 1621289880 not_after: 1621289880 intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 '400': $ref: '#/components/responses/Sso400' '401': $ref: '#/components/responses/Sso401' '403': $ref: '#/components/responses/Sso403' '429': $ref: '#/components/responses/Sso429' '500': $ref: '#/components/responses/Sso500' delete: operationId: DeleteSsoCertificate summary: Delete an SSO Certificate tags: - SSO Certificates description: '**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate''s ID from the response provided by the "Get All SSO Integrations" endpoint.' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SsoCertificateBody' examples: response: value: public_certificate: id: 66138975 not_before: 1621289880 not_after: 1621289880 intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 '400': $ref: '#/components/responses/Sso400' '401': $ref: '#/components/responses/Sso401' '403': $ref: '#/components/responses/Sso403' '429': $ref: '#/components/responses/Sso429' '500': $ref: '#/components/responses/Sso500' /v3/sso/integrations/{integration_id}/certificates: parameters: - name: integration_id in: path description: An ID that matches a certificate to a specific IdP integration. required: true schema: type: string get: operationId: ListSsoIntegrationCertificate summary: Get All SSO Certificates by Integration tags: - SSO Certificates description: '**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the "Get All SSO Integrations" endpoint.' responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/SsoCertificateBody' examples: response: value: - public_certificate: id: 66138975 not_before: 1621289880 not_after: 1621289880 intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 '400': $ref: '#/components/responses/Sso400' '401': $ref: '#/components/responses/Sso401' '403': $ref: '#/components/responses/Sso403' '429': $ref: '#/components/responses/Sso429' '500': $ref: '#/components/responses/Sso500' components: responses: Sso401: description: '' content: application/json: schema: $ref: '#/components/schemas/SsoErrorResponse' Sso500: description: '' content: application/json: schema: $ref: '#/components/schemas/SsoErrorResponse' Sso403: description: '' content: application/json: schema: $ref: '#/components/schemas/SsoErrorResponse' Sso400: description: '' content: application/json: schema: $ref: '#/components/schemas/SsoErrorResponse' Sso429: description: '' content: application/json: schema: $ref: '#/components/schemas/SsoErrorResponse' schemas: SsoErrorResponse: title: SSO Error Response type: array items: type: object properties: message: type: string field: nullable: true type: string error_id: type: string SsoCertificateBody: title: Single Sign-On Certificate Body type: object properties: public_certificate: type: string description: This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. id: type: number description: A unique ID assigned to the certificate by SendGrid. not_before: type: number description: A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. not_after: type: number description: A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. intergration_id: type: string description: An ID that matches a certificate to a specific IdP integration. example: public_certificate: id: 66138975 not_before: 1621289880 not_after: 1621289880 intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312 securitySchemes: BearerAuth: type: http scheme: bearer description: Twilio SendGrid requires you to authenticate with its APIs using an API key. The API key must be sent as a bearer token in the Authorization header. externalDocs: description: Twilio SendGrid's official developer documentation. url: https://www.twilio.com/docs/sendgrid