Twilio - Accounts icon

Twilio - Accounts

This is the public Twilio REST API

COMMUNITYAPI KEY0 INSTALLS
API Docs
OpenAPI Specificationv3.0
{
  "openapi": "3.0.1",
  "servers": [
    {
      "url": "https://accounts.twilio.com"
    }
  ],
  "info": {
    "contact": {
      "email": "support@twilio.com",
      "name": "Twilio Support",
      "url": "https://support.twilio.com"
    },
    "description": "This is the public Twilio REST API.",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "termsOfService": "https://www.twilio.com/legal/tos",
    "title": "Twilio - Accounts",
    "version": "1.42.0",
    "x-apisguru-categories": [
      "telecom",
      "messaging"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_static1.twilio.com_marketing_bundles_marketing_img_logos_wordmark-red.svg"
    },
    "x-origin": [
      {
        "format": "openapi",
        "url": "https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_accounts_v1.json",
        "version": "3.0"
      }
    ],
    "x-providerName": "twilio.com",
    "x-serviceName": "twilio_accounts_v1"
  },
  "paths": {
    "/v1/AuthTokens/Promote": {
      "description": "Auth Token promotion",
      "post": {
        "description": "Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.",
        "operationId": "UpdateAuthTokenPromotion",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.auth_token_promotion"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [
          "account_sid",
          "auth_token",
          "date_created"
        ],
        "mountName": "auth_token_promotion",
        "pathType": "instance"
      }
    },
    "/v1/AuthTokens/Secondary": {
      "delete": {
        "description": "Delete the secondary Auth Token from your account",
        "operationId": "DeleteSecondaryAuthToken",
        "responses": {
          "204": {
            "description": "The resource was deleted successfully."
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "description": "Secondary Auth Token",
      "post": {
        "description": "Create a new secondary Auth Token",
        "operationId": "CreateSecondaryAuthToken",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.secondary_auth_token"
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [
          "account_sid",
          "secondary_auth_token",
          "date_created"
        ],
        "mountName": "secondary_auth_token",
        "pathType": "instance"
      }
    },
    "/v1/Credentials": {
      "description": "TODO: Resource-level docs",
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [],
        "pathType": "list"
      }
    },
    "/v1/Credentials/AWS": {
      "description": "User provided AWS keys",
      "get": {
        "description": "Retrieves a collection of AWS Credentials belonging to the account used to make the request",
        "operationId": "ListCredentialAws",
        "parameters": [
          {
            "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.",
            "in": "query",
            "name": "PageSize",
            "schema": {
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The page index. This value is simply for client state.",
            "in": "query",
            "name": "Page",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "The page token. This is provided by the API.",
            "in": "query",
            "name": "PageToken",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "credentials": {
                      "items": {
                        "$ref": "#/components/schemas/accounts.v1.credential.credential_aws"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "first_page_url": {
                          "format": "uri",
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        },
                        "next_page_url": {
                          "format": "uri",
                          "nullable": true,
                          "type": "string"
                        },
                        "page": {
                          "type": "integer"
                        },
                        "page_size": {
                          "type": "integer"
                        },
                        "previous_page_url": {
                          "format": "uri",
                          "nullable": true,
                          "type": "string"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "title": "ListCredentialAwsResponse",
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "post": {
        "description": "Create a new AWS Credential",
        "operationId": "CreateCredentialAws",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "AccountSid": {
                    "description": "The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request.",
                    "maxLength": 34,
                    "minLength": 34,
                    "pattern": "^AC[0-9a-fA-F]{32}$",
                    "type": "string"
                  },
                  "Credentials": {
                    "description": "A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`",
                    "type": "string"
                  },
                  "FriendlyName": {
                    "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.",
                    "type": "string"
                  }
                },
                "required": [
                  "Credentials"
                ],
                "title": "CreateCredentialAwsRequest",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.credential.credential_aws"
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [
          "sid",
          "friendly_name",
          "date_created"
        ],
        "parent": "/Credentials",
        "pathType": "list"
      }
    },
    "/v1/Credentials/AWS/{Sid}": {
      "delete": {
        "description": "Delete a Credential from your account",
        "operationId": "DeleteCredentialAws",
        "parameters": [
          {
            "description": "The Twilio-provided string that uniquely identifies the AWS resource to delete.",
            "in": "path",
            "name": "Sid",
            "required": true,
            "schema": {
              "maxLength": 34,
              "minLength": 34,
              "pattern": "^CR[0-9a-fA-F]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was deleted successfully."
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "description": "User provided AWS keys",
      "get": {
        "description": "Fetch the AWS credentials specified by the provided Credential Sid",
        "operationId": "FetchCredentialAws",
        "parameters": [
          {
            "description": "The Twilio-provided string that uniquely identifies the AWS resource to fetch.",
            "in": "path",
            "name": "Sid",
            "required": true,
            "schema": {
              "maxLength": 34,
              "minLength": 34,
              "pattern": "^CR[0-9a-fA-F]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.credential.credential_aws"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "post": {
        "description": "Modify the properties of a given Account",
        "operationId": "UpdateCredentialAws",
        "parameters": [
          {
            "description": "The Twilio-provided string that uniquely identifies the AWS resource to update.",
            "in": "path",
            "name": "Sid",
            "required": true,
            "schema": {
              "maxLength": 34,
              "minLength": 34,
              "pattern": "^CR[0-9a-fA-F]{32}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "FriendlyName": {
                    "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.",
                    "type": "string"
                  }
                },
                "title": "UpdateCredentialAwsRequest",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.credential.credential_aws"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [
          "sid",
          "friendly_name",
          "date_created"
        ],
        "parent": "/Credentials",
        "pathType": "instance"
      }
    },
    "/v1/Credentials/PublicKeys": {
      "description": "User provided public keys",
      "get": {
        "description": "Retrieves a collection of Public Key Credentials belonging to the account used to make the request",
        "operationId": "ListCredentialPublicKey",
        "parameters": [
          {
            "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.",
            "in": "query",
            "name": "PageSize",
            "schema": {
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The page index. This value is simply for client state.",
            "in": "query",
            "name": "Page",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "The page token. This is provided by the API.",
            "in": "query",
            "name": "PageToken",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "credentials": {
                      "items": {
                        "$ref": "#/components/schemas/accounts.v1.credential.credential_public_key"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "first_page_url": {
                          "format": "uri",
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        },
                        "next_page_url": {
                          "format": "uri",
                          "nullable": true,
                          "type": "string"
                        },
                        "page": {
                          "type": "integer"
                        },
                        "page_size": {
                          "type": "integer"
                        },
                        "previous_page_url": {
                          "format": "uri",
                          "nullable": true,
                          "type": "string"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "title": "ListCredentialPublicKeyResponse",
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "post": {
        "description": "Create a new Public Key Credential",
        "operationId": "CreateCredentialPublicKey",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "AccountSid": {
                    "description": "The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request",
                    "maxLength": 34,
                    "minLength": 34,
                    "pattern": "^AC[0-9a-fA-F]{32}$",
                    "type": "string"
                  },
                  "FriendlyName": {
                    "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.",
                    "type": "string"
                  },
                  "PublicKey": {
                    "description": "A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----`",
                    "type": "string"
                  }
                },
                "required": [
                  "PublicKey"
                ],
                "title": "CreateCredentialPublicKeyRequest",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.credential.credential_public_key"
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [
          "sid",
          "friendly_name",
          "date_created"
        ],
        "mountName": "public_key",
        "parent": "/Credentials",
        "pathType": "list"
      }
    },
    "/v1/Credentials/PublicKeys/{Sid}": {
      "delete": {
        "description": "Delete a Credential from your account",
        "operationId": "DeleteCredentialPublicKey",
        "parameters": [
          {
            "description": "The Twilio-provided string that uniquely identifies the PublicKey resource to delete.",
            "in": "path",
            "name": "Sid",
            "required": true,
            "schema": {
              "maxLength": 34,
              "minLength": 34,
              "pattern": "^CR[0-9a-fA-F]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was deleted successfully."
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "description": "User provided public keys",
      "get": {
        "description": "Fetch the public key specified by the provided Credential Sid",
        "operationId": "FetchCredentialPublicKey",
        "parameters": [
          {
            "description": "The Twilio-provided string that uniquely identifies the PublicKey resource to fetch.",
            "in": "path",
            "name": "Sid",
            "required": true,
            "schema": {
              "maxLength": 34,
              "minLength": 34,
              "pattern": "^CR[0-9a-fA-F]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.credential.credential_public_key"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "post": {
        "description": "Modify the properties of a given Account",
        "operationId": "UpdateCredentialPublicKey",
        "parameters": [
          {
            "description": "The Twilio-provided string that uniquely identifies the PublicKey resource to update.",
            "in": "path",
            "name": "Sid",
            "required": true,
            "schema": {
              "maxLength": 34,
              "minLength": 34,
              "pattern": "^CR[0-9a-fA-F]{32}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "FriendlyName": {
                    "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.",
                    "type": "string"
                  }
                },
                "title": "UpdateCredentialPublicKeyRequest",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts.v1.credential.credential_public_key"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "x-maturity": [
          "GA"
        ]
      },
      "servers": [
        {
          "url": "https://accounts.twilio.com"
        }
      ],
      "x-twilio": {
        "defaultOutputProperties": [
          "sid",
          "friendly_name",
          "date_created"
        ],
        "mountName": "public_key",
        "parent": "/Credentials",
        "pathType": "instance"
      }
    }
  },
  "components": {
    "schemas": {
      "accounts.v1.auth_token_promotion": {
        "properties": {
          "account_sid": {
            "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.",
            "maxLength": 34,
            "minLength": 34,
            "nullable": true,
            "pattern": "^AC[0-9a-fA-F]{32}$",
            "type": "string"
          },
          "auth_token": {
            "description": "The promoted Auth Token that must be used to authenticate future API requests.",
            "nullable": true,
            "type": "string"
          },
          "date_created": {
            "description": "The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_updated": {
            "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "url": {
            "description": "The URI for this resource, relative to `https://accounts.twilio.com`",
            "format": "uri",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "accounts.v1.credential": {
        "properties": {},
        "type": "object"
      },
      "accounts.v1.credential.credential_aws": {
        "properties": {
          "account_sid": {
            "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AWS resource.",
            "maxLength": 34,
            "minLength": 34,
            "nullable": true,
            "pattern": "^AC[0-9a-fA-F]{32}$",
            "type": "string"
          },
          "date_created": {
            "description": "The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_updated": {
            "description": "The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "friendly_name": {
            "description": "The string that you assigned to describe the resource.",
            "nullable": true,
            "type": "string"
          },
          "sid": {
            "description": "The unique string that we created to identify the AWS resource.",
            "maxLength": 34,
            "minLength": 34,
            "nullable": true,
            "pattern": "^CR[0-9a-fA-F]{32}$",
            "type": "string"
          },
          "url": {
            "description": "The URI for this resource, relative to `https://accounts.twilio.com`",
            "format": "uri",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "accounts.v1.credential.credential_public_key": {
        "properties": {
          "account_sid": {
            "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Credential that the PublicKey resource belongs to.",
            "maxLength": 34,
            "minLength": 34,
            "nullable": true,
            "pattern": "^AC[0-9a-fA-F]{32}$",
            "type": "string"
          },
          "date_created": {
            "description": "The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_updated": {
            "description": "The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "friendly_name": {
            "description": "The string that you assigned to describe the resource.",
            "nullable": true,
            "type": "string"
          },
          "sid": {
            "description": "The unique string that that we created to identify the PublicKey resource.",
            "maxLength": 34,
            "minLength": 34,
            "nullable": true,
            "pattern": "^CR[0-9a-fA-F]{32}$",
            "type": "string"
          },
          "url": {
            "description": "The URI for this resource, relative to `https://accounts.twilio.com`",
            "format": "uri",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "accounts.v1.secondary_auth_token": {
        "properties": {
          "account_sid": {
            "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.",
            "maxLength": 34,
            "minLength": 34,
            "nullable": true,
            "pattern": "^AC[0-9a-fA-F]{32}$",
            "type": "string"
          },
          "date_created": {
            "description": "The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_updated": {
            "description": "The date and time in UTC when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "secondary_auth_token": {
            "description": "The generated secondary Auth Token that can be used to authenticate future API requests.",
            "nullable": true,
            "type": "string"
          },
          "url": {
            "description": "The URI for this resource, relative to `https://accounts.twilio.com`",
            "format": "uri",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "accountSid_authToken": {
        "scheme": "basic",
        "type": "http"
      }
    }
  },
  "x-maturity": [
    {
      "description": "This product is Generally Available.",
      "name": "GA"
    }
  ]
}