Skip to content

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/permission

Authentication

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

NameTypeRequiredDescription
momentobjectYesObject containing the Moment identifier
moment.collectionAddressstringYesThe contract address of the Moment
moment.tokenIdstringYesThe token ID of the Moment
moment.chainIdnumberNoThe Chain ID of the Moment (optional, default: Base 8453)
adminAddressstringYesThe 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

PropertyTypeDescription
hashstringThe transaction hash of the permission update
chainIdnumberThe 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.

Key points:
  • 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"
}