Skip to main content

Update GreenPin Allocation

Update parameters of an active GreenPin allocation.

Beta

This endpoint is currently in Beta.

HTTP Request​

PUT https://leadassist.exotel.in/v1/tenants/<tenant_id>/greenpin/<greenpin_id>

Headers​

HeaderValue
Content-Typeapplication/json
AuthorizationHTTP Basic Auth — Account SID as username, ExoBridge token as password

Path Parameters​

ParameterDescription
tenant_idYour tenant identifier
greenpin_idThe unique identifier of the GreenPin allocation to update

Request Body Parameters​

All parameters are optional. Include only the fields you want to update — omitted fields remain unchanged.

ParameterTypeDescription
fromArray of StringsReplace the A-party number(s). E.164 format. Replaces the entire existing list.
toArray of StringsReplace the B-party number(s). E.164 format. Replaces the entire existing list. Useful for adding a B-party to an allocation created without one.
durationIntegerNew validity period in seconds, counted from the time of this update request. Min: 300. Max: 14688000.
max_pin_attemptsIntegerUpdate the maximum number of incorrect PIN attempts allowed before lockout.
recordBooleanEnable (true) or disable (false) call recording for this allocation.
custom_fieldStringReplace the custom metadata string (max 256 characters).

Example Request​

curl -X PUT \
'https://leadassist.exotel.in/v1/tenants/<tenant_id>/greenpin/gp_abc123xyz' \
-u '<account_sid>:<exobridge_token>' \
-H 'Content-Type: application/json' \
-d '{
"to": ["+917700XXXXXX"],
"duration": 7200,
"record": true,
"custom_field": "order_id=12345&updated=true"
}'

Example Response​

{
"response": {
"greenpin_id": "gp_abc123xyz",
"virtual_number": "+914000XXXXXX",
"pin": "4821",
"from": ["+919900XXXXXX"],
"to": ["+917700XXXXXX"],
"status": "active",
"created_at": "2024-06-15T10:30:00+05:30",
"expires_at": "2024-06-15T13:00:00+05:30",
"record": true,
"custom_field": "order_id=12345&updated=true"
}
}

Bulk Update​

To update multiple allocations in a single request:

PUT https://leadassist.exotel.in/v1/tenants/<tenant_id>/greenpin

The request body must be an array of objects. Each object must include the greenpin_id of the allocation to update, plus any fields to change.

Bulk Update Request Body Schema:

FieldTypeRequiredDescription
greenpin_idStringYesIdentifier of the allocation to update
fromArray of StringsNoReplace A-party number(s)
toArray of StringsNoReplace B-party number(s)
durationIntegerNoNew validity in seconds from now
max_pin_attemptsIntegerNoUpdate max PIN attempts
recordBooleanNoEnable/disable recording
custom_fieldStringNoReplace custom metadata

Example Bulk Update Request:

curl -X PUT \
'https://leadassist.exotel.in/v1/tenants/<tenant_id>/greenpin' \
-u '<account_sid>:<exobridge_token>' \
-H 'Content-Type: application/json' \
-d '[
{
"greenpin_id": "gp_abc123xyz",
"to": ["+917700XXXXXX"],
"duration": 7200
},
{
"greenpin_id": "gp_def456uvw",
"record": true,
"custom_field": "campaign=summer_sale"
}
]'

Example Bulk Update Response:

{
"response": [
{
"greenpin_id": "gp_abc123xyz",
"status": "updated"
},
{
"greenpin_id": "gp_def456uvw",
"status": "updated"
}
]
}

HTTP Status Codes​

Status CodeMeaning
200 OKUpdate applied successfully. Response body contains the updated allocation object (or array for bulk).
400 Bad RequestMissing or invalid parameters. Check field formats and value ranges.
401 UnauthorizedAuthentication failed. Verify your Account SID and ExoBridge token.
403 ForbiddenYou do not have permission to update this allocation.
404 Not FoundNo allocation exists for the given greenpin_id under this tenant.
409 ConflictThe update conflicts with the current state (e.g., attempting to update an expired or deleted allocation).
422 Unprocessable EntityParameters are structurally valid but fail business rules (e.g., duration out of range).
500 Internal Server ErrorUnexpected server error. Retry with exponential backoff.