Retrieve a single SMTP Custom Email (sender) by its ID via the Pipefy GraphQL API.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Why this use case
When managing outbound email senders, you may need to inspect a specific SMTP Custom Email record — for example, to verify its sender name and address, confirm which SMTP configuration it uses, or check whether re-authentication is required. This use case shows how to retrieve a single SMTP Custom Email by its ID.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: Your token must have read access to the SMTP Custom Email record. Only users with the appropriate organization permissions can retrieve it.
- SMTP Custom Email ID: The ID of the sender you want to retrieve. You can find it in the response from Create SMTP Custom Email with SMTP Configuration.
Step 1: Retrieve the SMTP Custom Email
Run the following query, replacing "<SMTP_CUSTOM_EMAIL_ID>" with the actual ID of the sender.
{
smtpCustomEmail(id: "<SMTP_CUSTOM_EMAIL_ID>") {
id
emailAddress
senderName
defaultForOrganization
smtpConfigurationId
smtpConfiguration {
id
host
port
defaultSmtp
organizationId
}
reauthRequired
createCardRepoUuid
}
}
Arguments
id: ID — Required — the ID of the SMTP Custom Email to retrieve.
Sample response
{
"data": {
"smtpCustomEmail": {
"id": "a4f1b2c3-d4e5-6f78-9abc-d0e1f2a3b4c5",
"emailAddress": "[email protected]",
"senderName": "Acme Support",
"defaultForOrganization": false,
"smtpConfigurationId": "7e9f4d01-b412-43e0-999c-73e4f36889a9",
"smtpConfiguration": {
"id": "7e9f4d01-b412-43e0-999c-73e4f36889a9",
"host": "smtp.sendgrid.net",
"port": "587",
"defaultSmtp": true,
"organizationId": "980700673"
},
"reauthRequired": false,
"createCardRepoUuid": null
}
}
}
Response field notes:
defaultForOrganization:trueif this sender is the organization's default for outbound emails.reauthRequired:trueif the underlying Microsoft credential has expired and re-authorization is needed before this sender can be used.createCardRepoUuid: present when this sender is associated with a specific pipe's card-creation inbox;nullotherwise.portis returned as a String, not an integer.
Key Notes
- Querying an ID that does not exist returns a GraphQL error, not a
nulldata field. - Retrieving a sender that belongs to an organization you do not have access to returns a
Permission deniederror. - To list all senders for an organization, use the
smtpCustomEmailsquery instead. - To create a sender, see Create SMTP Custom Email with SMTP Configuration.
- To list or inspect the underlying SMTP configurations, see List SMTP Configurations.
