> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Save Firebase Credentials

> Connect Android push with a Firebase service account

# Save Firebase Credentials

Saves the Firebase service account used for Android push. The file must be a service account key with a private key, and `token_uri`, when present, must be Google's. It is encrypted at rest and never returned. The account needs the Firebase Cloud Messaging API Admin role.

`DELETE /api/v1/push/settings/android` removes the credentials. Android devices stop receiving push until you upload a key again; registered devices are kept.

Both require the `integrations:manage` scope and edit access to the workspace.

## Request

<ParamField body="serviceAccount" type="object | string" required>
  The service account JSON file from Firebase project settings > Service
  accounts, as a JSON object or a string.
</ParamField>

```bash theme={null}
curl -X PUT "https://api.sequenzy.com/api/v1/push/settings/android" \
  --header "Authorization: Bearer $SEQUENZY_API_KEY" \
  --header "Content-Type: application/json" \
  --data "{\"serviceAccount\": $(cat firebase-key.json)}"
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "push": {
      "web": {
        "enabled": true,
        "vapidPublicKey": "BH3tXU0JSzok9ND7DyeQRcEy..."
      },
      "ios": {
        "configured": true,
        "keyId": "ABC123DEFG",
        "teamId": "DEF123GHIJ",
        "bundleId": "com.example.app",
        "environment": "production",
        "lastError": null,
        "lastErrorAt": null
      },
      "android": {
        "configured": true,
        "projectId": "demo-project",
        "clientEmail": "push@demo-project.iam.gserviceaccount.com",
        "lastError": null,
        "lastErrorAt": null
      },
      "defaultIconUrl": "https://cdn.example.com/icon-192.png"
    },
    "message": "Firebase credentials saved."
  }
  ```

  ```json 400 theme={null}
  {
    "error": "token_uri must be https://oauth2.googleapis.com/token."
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid API key"
  }
  ```

  ```json 403 theme={null}
  {
    "error": "API key is missing required scope: integrations:manage"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.