Create your first record

The first successful workflow should prove that an agent can safely create business state and that the human admin can inspect what happened.

Goal

Create a CRM contact, a follow-up task, and an activity log entry in one workspace. Each write should return a request_id, create an audit event, and create a usage event.

REST contact

Create contactbash
curl -X POST "$SLAB5_API_BASE_URL/contacts" \
  -H "Authorization: Bearer $SLAB5_WORKSPACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane@acme.com",
    "company_name": "Acme Corp",
    "idempotency_key": "first_contact_jane_doe"
  }'

REST task

Create taskbash
curl -X POST "$SLAB5_API_BASE_URL/tasks" \
  -H "Authorization: Bearer $SLAB5_WORKSPACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Follow up with Jane Doe",
    "description": "Send next steps after the initial Acme Corp conversation.",
    "status": "open",
    "idempotency_key": "first_task_jane_doe_followup"
  }'

REST activity

Log activitybash
curl -X POST "$SLAB5_API_BASE_URL/activities" \
  -H "Authorization: Bearer $SLAB5_WORKSPACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "agent_action",
    "summary": "Created Jane Doe contact and follow-up task.",
    "idempotency_key": "first_activity_jane_doe"
  }'

MCP contact

Agents use MCP tools against the same workspace data:

Create contact through MCPbash
curl -X POST "$SLAB5_MCP_URL" \
  -H "Authorization: Bearer $SLAB5_WORKSPACE_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "contact-1",
    "method": "tools/call",
    "params": {
      "name": "create_contact",
      "arguments": {
        "name": "Jane Doe",
        "email": "jane@acme.com",
        "company_name": "Acme Corp",
        "idempotency_key": "mcp_first_contact_jane_doe"
      }
    }
  }'

Expected records

  • CRM contact: Jane Doe
  • Company name on the contact: Acme Corp
  • Task: Follow up with Jane Doe
  • Activity: Created Jane Doe contact and follow-up task.
  • Audit events for each write
  • Usage events for each MCP/API call
  • Request IDs in each response

Next records

After the first CRM flow works, repeat the same pattern for:

  • asset upload intent through POST /v1/assets
  • support ticket through POST /v1/support/tickets
  • webhook endpoint through POST /v1/webhooks
  • BI dashboard through POST /v1/bi/dashboards
  • analytics governance event through POST /v1/analytics/events

Was this page helpful?