Add Admin to a Moment
This page documents the API endpoint for adding admin permissions to a Moment on the In Process protocol. This endpoint allows artists to grant admin permissions to other addresses for managing their Moments.
Note: Only the current Moment admin can add permissions to other addresses. The transaction is executed via a smart account using Coinbase CDP.
Endpoint
POST https://inprocess.world/api/moment/permissionAuthentication
Include an API key in the x-api-key header for authorization:
x-api-key: <artist_api_key>Show more
See Create an Artist API Key for how to create API keys.
Request Body
Send a JSON object with the following fields:
{
"moment": {
"collectionAddress": "string", // Contract address of the Moment
"tokenId": "string", // Token ID of the Moment
"chainId": number // Chain ID (optional, default: Base 8453)
},
"adminAddress": "string" // Address to grant admin permissions to
}Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| moment | object | Yes | Object containing the Moment identifier |
| moment.collectionAddress | string | Yes | The contract address of the Moment |
| moment.tokenId | string | Yes | The token ID of the Moment |
| moment.chainId | number | No | The Chain ID of the Moment (optional, default: Base 8453) |
| adminAddress | string | Yes | The address to grant admin permissions to |
Example Requests
cURL
curl -X POST https://inprocess.world/api/moment/permission \
-H "Content-Type: application/json" \
-H "x-api-key: art_sk_3fnm4...f6w4" \
-d '{
"moment": {
"collectionAddress": "0x297F21AAc502571db2c7dBFD271E68Dae7F2cE1E",
"tokenId": "1"
},
"adminAddress": "0x119A62232b96ADfC85E40C57fE44acA740CF6730"
}'Example Response
{
"hash": "0xTransactionHash",
"chainId": 8453
}Response Properties
| Property | Type | Description |
|---|---|---|
| hash | string | The transaction hash of the permission update |
| chainId | number | The chain ID where the transaction was executed |
How It Works
This endpoint grants admin permissions (permission bit 2) to the specified address for the given Moment. The permission is added onchain via the Collection contract's addPermission function.
- The transaction is executed using a smart account via Coinbase CDP
- The artist address from the API key is used as the signer
- Admin permissions allow the granted address to manage the Moment (e.g., update URI, set sales config, etc.)
- Only existing Moment admins can add permissions to other addresses
Error Responses
400 Bad Request
Invalid request parameters:
{
"error": "Invalid query parameters",
"errors": [
{
"field": "moment.collectionAddress",
"message": "Invalid address"
}
]
}500 Internal Server Error
{
"error": "Failed to add permission"
}