RequestRocketRequestRocketDocs
ConnectConsumers

Consumers API

Create an entitlement for an MCP server or a proxy.

Consumers are invited by email. The consumer id in the path is the consumer record sKey. cognitoSub is the MCP consumer-pool subject. An entitlement body is mcpId or proxyId. Send one of them.

Endpoints

MethodPathWhat it does
GET/api/clients/:clientId/consumersList consumers
POST/api/clients/:clientId/consumersInvite a consumer
GET/api/clients/:clientId/consumers/:consumerIdRead a consumer
DELETE/api/clients/:clientId/consumers/:consumerIdDelete a consumer
GET/api/clients/:clientId/consumers/:consumerId/entitlementsList entitlements for a consumer
POST/api/clients/:clientId/consumers/:consumerId/entitlementsCreate an entitlement
DELETE/api/clients/:clientId/consumers/:consumerId/entitlements/:resourceIdDelete an entitlement
GET/api/clients/:clientId/proxies/:proxyId/entitlementsList entitlements on a proxy
GET/api/clients/:clientId/mcps/:mcpId/entitlementsList entitlements on an MCP server

Invite a consumer

POST /api/clients/:clientId/consumers creates the consumer and sends an invite. A second invite for the same email returns 409 when that consumer already has an identity.

Request body

ParameterTypeRequiredDescription
emailstring✓Address the invite is sent to. Stored in lowercase.
givenNamestring✓Given name, 3–128 characters.
familyNamestring✓Family name, 3–128 characters.

Returns a consumers array. message is "Consumer invited" for a new identity, or "Consumer linked to an existing identity" when the email already exists in the consumer pool. The attributes match List consumers.

List consumers

GET /api/clients/:clientId/consumers returns every consumer for the organisation in one response. GET /api/clients/:clientId/consumers/:consumerId returns one consumer.

Response attributes

AttributeTypeDescription
consumersarrayOne or more consumer objects.
consumers[].sKeystringConsumer id. Pass this as consumerId.
consumers[].pKeystringOrganisation id.
consumers[].cognitoSubstringMCP consumer-pool subject.
consumers[].emailstringInvited email address.
consumers[].givenNamestringGiven name.
consumers[].familyNamestringFamily name.
consumers[].statusstring"active" or "inactive".
consumers[].createdIdentitybooleantrue when the invite created the pool user.
consumers[].invitedBystringUser id of the caller who sent the invite.
consumers[].createdAtstringISO 8601 creation time.
consumers[].updatedAtstringISO 8601 last update time.
messagestring"Success".

Create an entitlement

POST /api/clients/:clientId/consumers/:consumerId/entitlements grants the consumer one MCP server or one proxy.

Request

curl -X POST "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements" \
  -H "Authorization: u-your-token" \
  -H "Content-Type: application/json" \
  -d '{
  "mcpId": "c5a9e013-8d27-4b61-a4f0-1e6c3b8d5a47"
}'
import axios from "axios";

const response = await axios.request({
  method: "POST",
  url: "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements",
  headers: {
    "Authorization": "u-your-token",
    "Content-Type": "application/json",
  },
  data: {
  "mcpId": "c5a9e013-8d27-4b61-a4f0-1e6c3b8d5a47"
}
});

console.log(response.status, response.data);
import requests

response = requests.request(
    "POST",
    "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements",
    headers={
        "Authorization": "u-your-token",
        "Content-Type": "application/json",
    },
    data="{\n  \"mcpId\": \"c5a9e013-8d27-4b61-a4f0-1e6c3b8d5a47\"\n}"
)
print(response.status_code, response.json())
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    payload := strings.NewReader(`{
  "mcpId": "c5a9e013-8d27-4b61-a4f0-1e6c3b8d5a47"
}`)
    req, _ := http.NewRequest("POST", "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements", payload)
    req.Header.Set("Authorization", "u-your-token")
    req.Header.Set("Content-Type", "application/json")
    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.StatusCode, string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements"))
            .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"mcpId\": \"c5a9e013-8d27-4b61-a4f0-1e6c3b8d5a47\"\n}"))
            .header("Authorization", "u-your-token")
            .header("Content-Type", "application/json")
            .build();
        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode());
        System.out.println(response.body());
    }
}

Responses

{
  "entitlements": [
    {
      "consumerId": "e2b6d094-1f73-4a58-8c0e-9d3a5f7b2c16",
      "clientId": "b3a1c7d2-5e44-4f0a-9c1e-7d2f8a6b1c90",
      "mcpId": "c5a9e013-8d27-4b61-a4f0-1e6c3b8d5a47",
      "cognitoSub": "e2b6d094-1f73-4a58-8c0e-9d3a5f7b2c16",
      "mcpRegion": "us-east-2",
      "resourceType": "mcp",
      "status": "active",
      "expiresAt": null,
      "createdAt": "2026-11-02T07:30:00.000Z",
      "updatedAt": "2026-11-02T07:30:00.000Z"
    }
  ],
  "message": "Entitlement created"
}
{
  "message": "Provide either mcpId or proxyId"
}
{
  "message": "Unauthorized"
}
{
  "Message": "User is not authorized to access this resource with an explicit deny in an identity-based policy"
}
{
  "message": "method / endpoint not supported"
}

Returns an entitlements array with message set to "Entitlement created".

Request body

Send mcpId or proxyId. Sending both, or neither, returns 400. On this path consumerId is taken from the URL.

ParameterTypeRequiredDescription
mcpIdstringone ofMCP server to grant. Omit when granting a proxy.
proxyIdstringone ofProxy to grant. Omit when granting an MCP server.
expiresAtstring—ISO-8601 timestamp in the future. Omit for a grant that does not expire.
consumerIdstring—The URL supplies the consumer on this path.

Response attributes

AttributeTypeDescription
entitlementsarrayOne or more entitlement objects.
entitlements[].sKeystringGranted resource id. Pass this as resourceId to delete the entitlement.
entitlements[].pKeystringConsumer id.
entitlements[].consumerIdstringConsumer id.
entitlements[].clientIdstringOrganisation id.
entitlements[].cognitoSubstringConsumer-pool subject copied onto the grant.
entitlements[].resourceTypestring"mcp" or "proxy".
entitlements[].mcpIdstring or nullMCP server id, when the grant is for an MCP server.
entitlements[].proxyIdstring or nullProxy id, when the grant is for a proxy.
entitlements[].mcpRegion or proxyRegionstringRegion of the granted resource.
entitlements[].statusstring"active".
entitlements[].expiresAtstring or nullISO 8601 expiry, or null when the grant does not expire.
entitlements[].createdAtstringISO 8601 creation time.
entitlements[].updatedAtstringISO 8601 last update time.
messagestring"Entitlement created".

List entitlements

These reads return an entitlements array with message set to "Success". Each item matches the attributes above.

MethodPath
GET/api/clients/:clientId/consumers/:consumerId/entitlements
GET/api/clients/:clientId/proxies/:proxyId/entitlements
GET/api/clients/:clientId/mcps/:mcpId/entitlements

Delete an entitlement

DELETE /api/clients/:clientId/consumers/:consumerId/entitlements/:resourceId removes the grant. resourceId is the MCP server id or the proxy id.

Request

curl -X DELETE "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements/:resourceId" \
  -H "Authorization: u-your-token"
import axios from "axios";

const response = await axios.request({
  method: "DELETE",
  url: "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements/:resourceId",
  headers: {
    "Authorization": "u-your-token",
  }
});

console.log(response.status, response.data);
import requests

response = requests.request(
    "DELETE",
    "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements/:resourceId",
    headers={
        "Authorization": "u-your-token",
    }
)
print(response.status_code, response.json())
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    var payload io.Reader
    req, _ := http.NewRequest("DELETE", "https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements/:resourceId", payload)
    req.Header.Set("Authorization", "u-your-token")
    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.StatusCode, string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.requestrocket.com/api/clients/:clientId/consumers/:consumerId/entitlements/:resourceId"))
            .method("DELETE", HttpRequest.BodyPublishers.noBody())
            .header("Authorization", "u-your-token")
            .build();
        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode());
        System.out.println(response.body());
    }
}

Responses

{
  "message": "Entitlement deleted"
}
{
  "message": "Valid entitlement is required"
}
{
  "message": "Unauthorized"
}
{
  "Message": "User is not authorized to access this resource with an explicit deny in an identity-based policy"
}
{
  "message": "method / endpoint not supported"
}

Returns message set to "Entitlement deleted".

Next

On this page