openapi: 3.2.0
info:
title: SMTP2GO ALLOWED SENDERS API
version: 3.0.4
description: The SMTP2GO v3 REST API for sending transactional email and SMS, managing sender domains and single sender emails, SMTP users, API keys, IP allow lists and IP auth, templates, webhooks, suppressions, subaccounts, dedicated IPs, email archive, activity search and delivery statistics. Every operation is a POST (with a PATCH variant on two paths) carrying a JSON body; authentication is an API key supplied in the X-Smtp2go-Api-Key header or as an api_key field in the request body.
contact:
name: SMTP2GO Support
url: https://support.smtp2go.com/
termsOfService: https://www.smtp2go.com/terms/
x-harvest:
source: https://developers.smtp2go.com/mcp
method: MCP tools/call get-endpoint, one call per path+method, assembled verbatim
harvested: '2026-08-13'
server_info:
name: SMTP2GO-API-Docs
version: 3.0.4
note: SMTP2GO does not publish a single fetchable OpenAPI URL; the ReadMe registry path answers 429 to non-browser clients. The provider's own remote MCP server returns the authoritative OpenAPI 3.1.0 fragment for each endpoint anonymously, and those 73 fragments are merged here without modification.
servers:
- url: https://api.smtp2go.com/v3
description: Regionless
- url: https://us-api.smtp2go.com/v3
description: US Region
- url: https://eu-api.smtp2go.com/v3
description: EU Region
- url: https://au-api.smtp2go.com/v3
description: AU Region
security:
- sec0: []
tags:
- name: ALLOWED SENDERS
description: Manage the allowed/restricted senders list
paths:
/allowed_senders/add:
post:
tags:
- ALLOWED SENDERS
summary: Add allowed senders
description: Add one or more email addresses and domain names to your Allowed or Restricted Senders List. How this list of email addresses and domain names are used is shown by the current 'mode' value; if the Restrict Senders setting is on, they will form either a whitelist or blacklist. If the setting is off, the list will be disabled. Further details of the associated setting are found in the SMTP2GO Guides. Details of how this mode can be set via the update end-point, are given further in the documentation. A post to this endpoint will return a success, even if the Restrict Senders setting is not in use.
operationId: add-allowed-senders
requestBody:
content:
application/json:
schema:
type: object
required:
- allowed_senders
properties:
allowed_senders:
type: array
description: Array of email addresses and domain names.
default:
- test-person@example.com
- other@example.com
items:
type: string
subaccount_id:
type: string
description: If you wish to make this API call on behalf of a subaccount then include its unique ID here
responses:
'200':
description: Allowed Senders list updated
content:
application/json:
examples:
Example:
value:
request_id: b8f3c2b4-63ca-11ed-b66a-f23c9216ce11
data:
allowed_senders:
- test@test.com
mode: disabled
schema:
type: object
required:
- request_id
- data
properties:
request_id:
type: string
example: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
type: object
required:
- allowed_senders
- mode
properties:
allowed_senders:
type: array
description: A list of email addresses and domain names
items:
type: string
example: test-person@example.com
mode:
type: string
description: A string indicating how the list of email address and domain names is interpreted.
example: whitelist
enum:
- whitelist
- blacklist
- disabled
'400':
description: '400'
content:
application/json:
examples:
Example:
value:
request_id: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
error_code: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error: You do not have permission to access this API endpoint
schema:
type: object
properties:
request_id:
type: string
example: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
type: object
properties:
error_code:
type: string
example: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error:
type: string
example: You do not have permission to access this API endpoint
deprecated: false
/allowed_senders/remove:
post:
tags:
- ALLOWED SENDERS
summary: Remove allowed senders
description: 'Remove one or more emails addresses or domain names stored in your Allowed or Restricted Senders List. Note: In the event that any of the email addresses or domains do not feature in the list, no error will be raised.'
operationId: remove-allowed-senders
requestBody:
content:
application/json:
schema:
type: object
required:
- allowed_senders
properties:
allowed_senders:
type: array
description: Array of email addresses and domain names to remove.
default:
- test-person@example.com
items:
type: string
subaccount_id:
type: string
description: If you wish to make this API call on behalf of a subaccount then include its unique ID here
responses:
'200':
description: Allowed Sender Removed
content:
application/json:
examples:
Example:
value:
request_id: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
allowed_senders:
- test-person@example.com
mode: disabled
schema:
type: object
required:
- request_id
- data
properties:
request_id:
type: string
example: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
type: object
required:
- allowed_senders
- mode
properties:
allowed_senders:
type: array
description: A list of email addresses and domain names
items:
type: string
example: test-person@example.com
mode:
type: string
description: A string indicating how the list of email address and domain names is interpreted.
example: whitelist
enum:
- whitelist
- blacklist
- disabled
'400':
description: '400'
content:
application/json:
examples:
Example:
value:
request_id: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
error_code: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error: You do not have permission to access this API endpoint
schema:
type: object
properties:
request_id:
type: string
example: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
type: object
properties:
error_code:
type: string
example: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error:
type: string
example: You do not have permission to access this API endpoint
deprecated: false
/allowed_senders/update:
post:
tags:
- ALLOWED SENDERS
summary: Update allowed senders
description: Replace the email addresses and domain names on your Allowed or Restricted Senders List using this endpoint. How the email addresses and domain names are used is defined in the current 'mode' value - further details of these modes are found in the SMPT2GO Guides. Note that a post to this endpoint will return a success, even if the setting is not in use.
operationId: update-allowed-senders
requestBody:
content:
application/json:
schema:
type: object
required:
- allowed_senders
- mode
properties:
allowed_senders:
type: array
description: Array of email addresses and domain names.
default:
- test-person@example.com
- other@example.com
items:
type: string
mode:
type: string
description: A string indicating how the list of email address and domain names is interpreted. and should be one of 'whitelist', 'blacklist' or 'disabled'.
Warning: Changing the mode to 'whitelist' or 'blacklist' disables the 'Sender Domains' and 'Single Sender Emails' features.
default: whitelist
enum:
- whitelist
- blacklist
- disabled
subaccount_id:
type: string
description: If you wish to make this API call on behalf of a subaccount then include its unique ID here
responses:
'200':
description: Allowed Senders list updated
content:
application/json:
examples:
Example:
value:
request_id: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
allowed_senders:
- test-person@example.com
- otherexample.com
mode: whitelist
schema:
type: object
required:
- request_id
- data
properties:
request_id:
type: string
example: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
type: object
required:
- allowed_senders
- mode
properties:
allowed_senders:
type: array
description: A list of email addresses and domain names
items:
type: string
example: test-person@example.com
mode:
type: string
description: A string indicating how the list of email address and domain names is interpreted.
example: whitelist
enum:
- whitelist
- blacklist
- disabled
'400':
description: '400'
content:
application/json:
examples:
Example:
value:
request_id: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
error_code: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error: You do not have permission to access this API endpoint
schema:
type: object
properties:
request_id:
type: string
example: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
type: object
properties:
error_code:
type: string
example: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error:
type: string
example: You do not have permission to access this API endpoint
deprecated: false
/allowed_senders/view:
post:
tags:
- ALLOWED SENDERS
summary: View allowed senders
description: Returns the email addresses and domain names on your Allowed or Restricted Senders list, as well as the Restrict Senders setting, which dictates how they are interpreted.
operationId: view-allowed-senders
requestBody:
content:
application/json:
schema:
type: object
required: []
properties:
subaccount_id:
type: string
description: If you wish to make this API call on behalf of a subaccount then include its unique ID here
responses:
'200':
description: List of Allowed Senders
content:
application/json:
examples:
Example:
value:
request_id: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
allowed_senders:
- test@test.com
mode: disabled
schema:
type: object
required:
- request_id
- data
properties:
request_id:
type: string
example: 40cbb6f2-935f-11e7-b5be-480fcf01a6f2
data:
type: object
required:
- allowed_senders
- mode
properties:
allowed_senders:
type: array
description: A list of email addresses and domain names
items:
type: string
example: test-person@example.com
mode:
type: string
description: A string indicating how the list of email address and domain names is interpreted.
example: whitelist
enum:
- whitelist
- blacklist
- disabled
'400':
description: '400'
content:
application/json:
examples:
Example:
value:
request_id: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
error_code: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error: You do not have permission to access this API endpoint
schema:
type: object
properties:
request_id:
type: string
example: 22e5acba-43bf-11e6-ae42-408d5cce2644
data:
type: object
properties:
error_code:
type: string
example: E_ApiResponseCodes.ENDPOINT_PERMISSION_DENIED
error:
type: string
example: You do not have permission to access this API endpoint
deprecated: false
components:
securitySchemes:
sec0:
type: apiKey
in: header
name: X-Smtp2go-Api-Key
x-default: ${SMTP2GO_API_KEY}