Create or update a user with the given ID. Updates lastSeenTime automatically.
const url = 'https://api.pingram.io/users/example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","email":"example","number":"example","pushTokens":[{"type":"FCM","token":"example","device":{"app_id":"example","ad_id":"example","device_id":"example","platform":"example","manufacturer":"example","model":"example"},"environment":"undefined"}],"webPushTokens":[{"sub":{"endpoint":"example","keys":{"p256dh":"example","auth":"example"}}}],"timezone":"example","slackChannel":"example","slackToken":{"access_token":"example","app_id":"example","authed_user":{"access_token":"example","expires_in":1,"id":"example","refresh_token":"example","scope":"example","token_type":"example"},"bot_user_id":"example","enterprise":{"id":"example","name":"example"},"error":"example","expires_in":1,"incoming_webhook":{"channel":"example","channel_id":"example","configuration_url":"example","url":"example"},"is_enterprise_install":true,"needed":"example","ok":true,"provided":"example","refresh_token":"example","scope":"example","team":{"id":"example","name":"example"},"token_type":"example","warning":"example","response_metadata":{"warnings":["example"],"next_cursor":"example","scopes":["example"],"acceptedScopes":["example"],"retryAfter":1,"messages":["example"]}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pingram.io/users/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "email": "example", "number": "example", "pushTokens": [ { "type": "FCM", "token": "example", "device": { "app_id": "example", "ad_id": "example", "device_id": "example", "platform": "example", "manufacturer": "example", "model": "example" }, "environment": "undefined" } ], "webPushTokens": [ { "sub": { "endpoint": "example", "keys": { "p256dh": "example", "auth": "example" } } } ], "timezone": "example", "slackChannel": "example", "slackToken": { "access_token": "example", "app_id": "example", "authed_user": { "access_token": "example", "expires_in": 1, "id": "example", "refresh_token": "example", "scope": "example", "token_type": "example" }, "bot_user_id": "example", "enterprise": { "id": "example", "name": "example" }, "error": "example", "expires_in": 1, "incoming_webhook": { "channel": "example", "channel_id": "example", "configuration_url": "example", "url": "example" }, "is_enterprise_install": true, "needed": "example", "ok": true, "provided": "example", "refresh_token": "example", "scope": "example", "team": { "id": "example", "name": "example" }, "token_type": "example", "warning": "example", "response_metadata": { "warnings": [ "example" ], "next_cursor": "example", "scopes": [ "example" ], "acceptedScopes": [ "example" ], "retryAfter": 1, "messages": [ "example" ] } } }'Authorizations
Parameters
Path Parameters
User ID
Request Bodyrequired
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
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" }}