Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.
const url = 'https://api.pingram.io/users/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pingram.io/users/example \ --header 'Authorization: Bearer <token>'Authorizations
Parameters
Path Parameters
User ID
Responses
200
Successful response
object
Unique user identifier. Required.
User’s email address for email notifications.
User’s phone number for SMS/call notifications.
Mobile push tokens (FCM, APN) for push notifications.
object
object
Used by APN to differentiate between sandbox and production builds (sandbox/undefined or production)
Web push subscription config from the browser.
object
Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser.
object
object
User’s timezone (e.g. “America/New_York”) for scheduling.
The destination channel of slack notifications sent to this user. Can be either of the following:
- Channel name, e.g. “test”
- Channel name with # prefix, e.g. “#test”
- Channel ID, e.g. “C1234567890”
- User ID for DM, e.g. “U1234567890”
- Username with @ prefix, e.g. “@test”
object
object
object
object
object
object
Last activity timestamp. Updated automatically. Read-only.
Last update timestamp. Read-only.
Creation timestamp. Read-only.
Bounce or complaint status if email was suppressed. Read-only.
object
object
Example
{ "pushTokens": [ { "type": "FCM", "environment": "undefined" } ], "emailSuppressionStatus": { "reason": "Bounce" }}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}