Sample - Twilio SendGrid Mail API
GET/v3/mail/batch/{batch_id}

Validate a batch ID.

This operation allows you to validate a mail batch ID.

If you provide a valid batch ID, this operation will return a 200 status code and the batch ID itself. If you provide an invalid batch ID, you will receive a 400 level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send.

1 parameter
on-behalf-ofstringoptional
Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header.

6 status codes
200Batch ID success response.
batch_idstringoptional
A mail batch ID.
400Batch ID bad response.
errorsarray<object>optional
idstringoptional
When applicable, this property value will be an error ID.
401Batch ID unauthorized response.
errorsarray<object>optional
idstringoptional
When applicable, this property value will be an error ID.
403Batch ID forbidden response.
errorsarray<object>optional
idstringoptional
When applicable, this property value will be an error ID.
405Get batch ID method not allowed response.
errorsarray<object>optional
idstringoptional
When applicable, this property value will be an error ID.
500Get batch ID internal server error response.
errorsarray<object>optional
idstringoptional
When applicable, this property value will be an error ID.

Error handling

A 400 is returned: Batch ID bad response. A 401 is returned: Batch ID unauthorized response. A 403 is returned: Batch ID forbidden response. A 405 is returned: Get batch ID method not allowed response. A 500 is returned: Get batch ID internal server error response.