Skip to content

API Authentication

How to authenticate requests from your backend to the NativeSuite API.

App Credentials

Each app has a credential with two values:

ValuePurpose
App SecretUsed to authenticate API calls from your backend (e.g., sending notifications)
Signing SecretUsed to verify that requests to your API came from NativeSuite (request signing)

Finding Your Credentials

  1. Navigate to your app in the dashboard
  2. Go to SettingsCredentials
  3. Copy the App Secret for API authentication

Using the App Secret

Include your app secret in the X-NativeSuite-Key header:

bash
curl -X POST https://api.staging.nativesuite.io/api/apps/{appId}/notifications/send \
  -H "X-NativeSuite-Key: {your-app-secret}" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Rotating Credentials

If your credential is compromised:

  1. Go to your app's SettingsCredentials
  2. Click Rotate Credential
  3. The old credential is immediately invalidated
  4. Update your backend with the new credential

WARNING

Rotating a credential invalidates the old one immediately. Make sure to update your backend before or immediately after rotation to avoid downtime.

Error Responses

API errors follow the RFC 9457 problem details format:

json
{
  "title": "Unauthorized",
  "status": 401,
  "detail": "X-NativeSuite-Key header is required"
}

Common errors:

StatusTitleMeaning
400Bad RequestInvalid input (malformed ID, missing required field)
401UnauthorizedMissing or invalid X-NativeSuite-Key header
403ForbiddenCredential doesn't belong to this app
404Not FoundApp or resource doesn't exist
422Unprocessable EntityValid request but can't be processed (e.g., no live release)
500Internal Server ErrorSomething went wrong on our end

Ship native mobile experiences without building an app.