> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept Lead

> This endpoint accepts an existing lead.

### Body

<ParamField body="lead_id" type="string">
  The ID provided in the data tab may be used to identify the lead
</ParamField>

### Response

<ResponseField name="id" type="string">
  The ID provided in the data tab may be used to identify the lead
</ResponseField>

<ResponseField name="object" type="string">
  The object type
</ResponseField>

<ResponseField name="success" type="number">
  Indicates whether the call was successful. true if successful, false if not.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/leads/:id/accept' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  }'
  ```

  ```graphQL GraphQL theme={null}
        mutation leadAcceptMutation {
          leadAccept (id: "${leadId}") {
            leads {
              id,
              status
            }
            userErrors {
              field
              message
            }
          }
        }
      `;
  ```

  ```js Node.js theme={null}
  const leads = await stateset.leads.accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  });
  ```

  ```python Python theme={null}
  leads = stateset.leads.accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  })
  ```

  ```ruby Ruby theme={null}
  leads = Stateset::Lead.accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  })
  ```

  ```go Go theme={null}
  leads, err := stateset.leads.accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  })
  ```

  ```java Java theme={null}
  Lead leads = stateset.leads.accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  });
  ```

  ```php PHP theme={null}
  $leads = $stateset->leads->accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  });
  ```

  ```csharp C# theme={null}
  var leads = await stateset.leads.accept({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "lead",
    "accepted": true
  }
  ```
</ResponseExample>
