---
title: "Readiness probe"
description: "Database + job queue."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/organization/readiness-probe"
---
# Readiness probe

> Database + job queue.

<api-operation method="GET" path="/readyz">
<template v-slot:docs="">

200 when Postgres answers and the `graphile_worker` schema is installed; 503 otherwise, with `db` and `queue` naming which one failed. Readiness pulls the process out of rotation without killing it. It does NOT report the billing worker — a dead clock must not take the API offline; the worker answers its own `/readyz` for that.

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        ready
      </code>
      
       when every dependency answers, <code>
        not_ready
      </code>
      
       otherwise. One of <code>
        ready
      </code>
      
      , <code>
        not_ready
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        service
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The service name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        db
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The database state. One of <code>
        up
      </code>
      
      , <code>
        down
      </code>
      
      , <code>
        unknown
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        queue
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The job queue state. One of <code>
        up
      </code>
      
      , <code>
        down
      </code>
      
      , <code>
        unknown
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        env
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The runtime environment.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Ready for traffic
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        503
      </code>
    </td>
    
    <td>
      A dependency is unavailable
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/readyz"
```

</template>

<template v-slot:response="">

```json [200 OK]
{
  "status": "ready",
  "service": "tmbilling-api",
  "db": "up",
  "queue": "up",
  "env": "production"
}
```

</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
