tRPC · Example Payload

Trpc Mutation Procedure Example

Example of calling a tRPC mutation procedure via HTTP POST

API CompositionAPI FrameworkBFFEnd-to-End Type SafetyRPCTypeScript

Trpc Mutation Procedure Example is an example object payload from tRPC, with 3 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

descriptionrequestresponse

Example Payload

Raw ↑
{
  "description": "Example of calling a tRPC mutation procedure via HTTP POST",
  "request": {
    "method": "POST",
    "url": "https://your-server.example.com/api/trpc/user.createUser",
    "headers": {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_TOKEN"
    },
    "body": {
      "json": {
        "name": "Bob Smith",
        "email": "bob@example.com",
        "role": "user"
      }
    }
  },
  "response": {
    "status": 200,
    "body": {
      "result": {
        "data": {
          "json": {
            "id": "user_456",
            "name": "Bob Smith",
            "email": "bob@example.com",
            "role": "user",
            "createdAt": "2026-05-03T12:00:00Z"
          }
        }
      }
    }
  }
}