API Keys
Your application, mail client, or website can all use API (Application Programming Interface) keys to authenticate access to SendGrid services. You can revoke an API key at any time without having to change your username and password, and an API key can be scoped to perform a limited number of actions.
There are 3 different types of API keys:
- Full Access
Allows the API key to accessGET
,PATCH
,PUT
,DELETE
andPOST
endpoints for all parts of your account, excluding billing and Email Address Validation. - Restricted Access
Customizes levels of access for all parts of your account, excluding billing and Email Address Validation. - Billing Access
Allows the API key to access billing endpoints for the account.
You must create your first API key using the Twilio SendGrid App. Once you have a key with permissions to manage other keys, you can use the endpoints documented as part of this API.
Retrieve an existing API Key
Twilio SendGrid API keys are 69 characters long. We are unable to make exceptions for third-party infrastructure that is unable to support a key of 69 characters.
GET /v3/api_keys/{api_key_id}
Base url: https://api.sendgrid.com
This endpoint allows you to retrieve a single API key using an api_key_id
.
The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a 404
status will be returned.
See the API Key Permissions List for all available scopes. An API key's scopes can be updated after creation using the "Update API keys" endpoint.
Authentication
- API Key
Headers
Path Parameters
Responses
The permissions this API Key has access to.
The ID of your API Key.
The name of your API Key.
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
Need some help?
We all do sometimes. Get help now from the Twilio SendGrid Support Team.
Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.