openapi: 3.1.0 info: title: Twilio SendGrid Provisioning Account Account State 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: Account State description: Twilio SendGrid Account Provisioning API account state operations. paths: /v3/partners/accounts/{accountID}/state: parameters: - $ref: '#/components/parameters/AccountProvisioningAccountId' get: operationId: GetAccountState summary: Get an account's state description: Retrieve the state of the specified account. tags: - Account State responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AccountProvisioningStateRead' '400': $ref: '#/components/responses/AccountProvisioningErrorResponse400' '401': $ref: '#/components/responses/AccountProvisioningErrorResponse401' '403': $ref: '#/components/responses/AccountProvisioningErrorResponse403' '404': $ref: '#/components/responses/AccountProvisioningErrorResponse404' '500': $ref: '#/components/responses/AccountProvisioningErrorResponse500' '502': $ref: '#/components/responses/AccountProvisioningErrorResponse502' '503': $ref: '#/components/responses/AccountProvisioningErrorResponse503' '504': $ref: '#/components/responses/AccountProvisioningErrorResponse504' put: operationId: UpdateAccountState summary: Update an account's state description: Update the state of the specified account. tags: - Account State requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AccountProvisioningStateWrite' responses: '204': description: State successfully updated '400': $ref: '#/components/responses/AccountProvisioningErrorResponse400' '401': $ref: '#/components/responses/AccountProvisioningErrorResponse401' '403': $ref: '#/components/responses/AccountProvisioningErrorResponse403' '500': $ref: '#/components/responses/AccountProvisioningErrorResponse500' '502': $ref: '#/components/responses/AccountProvisioningErrorResponse502' '503': $ref: '#/components/responses/AccountProvisioningErrorResponse503' '504': $ref: '#/components/responses/AccountProvisioningErrorResponse504' components: responses: AccountProvisioningErrorResponse401: description: Request lacks valid authentication credentials content: application/json: schema: title: Unauthorized type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: Failed to authenticate user field: '' error_id: 10-40100 AccountProvisioningErrorResponse403: description: Not authorized to make the request content: application/json: schema: title: Forbidden type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: The authenticated user is not authorized to perfrom this request field: '' error_id: 10-40300 AccountProvisioningErrorResponse504: description: Endpoint request timed out content: application/json: schema: title: Endpoint request timed out type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: Endpoint request timed out field: '' error_id: 10-50400 AccountProvisioningErrorResponse503: description: Service Unavailable content: application/json: schema: title: Service Unavailable type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: Service Unavailable field: '' error_id: 10-50300 AccountProvisioningErrorResponse404: description: Not Found content: application/json: schema: title: Not Found type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: No such endpoint field: '' error_id: 10-40400 AccountProvisioningErrorResponse500: description: Internal Server Error content: application/json: schema: title: InternalServerError type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: Something went wrong field: '' error_id: 10-50000 AccountProvisioningErrorResponse502: description: Bad Gateway content: application/json: schema: title: Bad Gateway type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' example: errors: - message: Bad Gateway field: '' error_id: 10-50200 AccountProvisioningErrorResponse400: description: The request was formatted incorrectly or missing required parameters. content: application/json: schema: title: Bad Request type: object properties: errors: type: array items: $ref: '#/components/schemas/ErrorResponse' required: - errors example: errors: - message: Field must be a valid email field: email error_id: 10-40002 - message: Field must be formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits. field: phone error_id: 10-40010 - message: Field must be a valid URL field: company_website error_id: 10-40008 schemas: State: type: string enum: - activated - deactivated - suspended - banned - indeterminate ErrorResponse: title: Error type: object properties: message: type: string description: The message representing the error from the API. field: type: string description: The field associated with the error. error_id: type: string description: ID representing the error as a unique nubmer. required: - message - field - error_id State1: type: string enum: - activated - deactivated AccountProvisioningStateRead: title: StateRead type: object properties: state: type: string description: The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) $ref: '#/components/schemas/State' required: - state example: state: activated AccountProvisioningStateWrite: title: StateWrite type: object properties: state: type: string description: The state of the account (e.g., `activated`, `deactivated`) $ref: '#/components/schemas/State1' required: - state example: state: activated parameters: AccountProvisioningAccountId: name: accountID in: path description: Twilio SendGrid account ID schema: type: string required: true example: sg2a2bcd3ef4ab5c67d8efab91c01de2fa 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