Authentication

    OAuth 2.0 with 17 granular scopes

    URBLD uses standard OAuth 2.0. Machines authenticate with client_credentials; user-consent apps use authorization_code with PKCE.

    How does URBLD API authentication work?

    URBLD uses OAuth 2.0. Server-to-server integrations and AI agents use the client_credentials grant. Third-party apps that act on behalf of a URBLD user use authorization_code with PKCE. Access tokens are bearer tokens scoped to one organization and one or more of 17 granular scopes (leads.read, jobs.write, etc.).

    Grant types

    client_credentials (recommended for AI agents)

    Use when your code acts as itself — a backend service, cron job, or autonomous agent bound to one organization.

    bash
    curl -X POST https://api.urbld.com/v1/oauth/token \
      -d "grant_type=client_credentials" \
      -d "client_id=$URBLD_CLIENT_ID" \
      -d "client_secret=$URBLD_CLIENT_SECRET" \
      -d "scope=leads.read jobs.write"

    authorization_code + PKCE

    Use when a URBLD user needs to grant your third-party app delegated access to their organization.

    1. Redirect the user to https://api.urbld.com/v1/oauth/authorize with response_type=code, client_id, redirect_uri, scope, state, and PKCE code_challenge.
    2. URBLD redirects back to your redirect_uri with a short-lived code.
    3. Exchange the code at the token endpoint with grant_type=authorization_code and your PKCE code_verifier.

    Using the token

    http
    GET /v1/customers/42 HTTP/1.1
    Host: api.urbld.com
    Authorization: Bearer eyJhbGciOi...

    Scopes

    Request only the scopes you need. URBLD's authorization screen shows the user exactly which scopes your app is requesting.

    ScopeGrants
    leads.readRead leads and lead activity.
    leads.writeCreate, update, and convert leads.
    customers.readRead customer records and lifecycle history.
    customers.writeCreate and update customer records.
    scheduling.readRead availability, appointments, and dispatch state.
    scheduling.writeBook, reschedule, and cancel appointments.
    estimates.readRead estimates and line items.
    estimates.writeCreate and update estimates.
    contracts.readRead contract packages and e-sign status.
    contracts.writeSend contract packages for signature.
    jobs.readRead job records from contract through warranty.
    jobs.writeUpdate job state, notes, and attachments.
    invoices.readRead invoices and AR aging.
    invoices.writeIssue and update invoices.
    payments.readRead payments and receipts.
    communications.readRead unified inbox threads.
    communications.writeSend SMS and email messages.

    Security requirements

    • Never embed client_secret in mobile or browser apps. Use PKCE without a secret for public clients.
    • Rotate secrets at least every 90 days.
    • Always validate the state parameter to prevent CSRF on the authorization_code flow.
    • Store tokens in a secure server-side store — never in localStorage.
    FAQ

    Frequently Asked Questions

    Straight answers about how URBLD runs the business end-to-end.