Addressability

The to value in the body of the request identifies the target agent to which the credential offer is sent. In the examples above, the name of the target agent is specified for readability. However, since agent names can change, or you may have connections to multiple agents with the same name, several methods are supported for addressing the target agent:

By name

Specify the name of the target agent.
{"to":{"name":"<agent-name>"}}

This method is convenient for prototyping, but because the name can change, use another method for production.

By connection ID

Specify the ID of a connection associated with a remote agent.
{"to":{"id":"<connection-id>"}}
If you have a connection with the target agent and know the connection ID, this is the recommended method.
Note: If a connection is deleted and re-created to the same agent, it creates a different connection ID.

By DID

Specify the DID of a remote agent.
{"to":{"did":"<DID>"}}

Ensure that you have a pre-existing connection with the target agent. The DID can be the value of the remote.public.did, remote.pairwise.did, or local.pairwise.did fields of the connection. This method is recommended when the target agent is associated with a public institution or organization.

By Invitation

Specify an invitation URL as follows:
{"to":{"invitation":{"url": "<invitation-URL>"}}

This initiates a connection-less interaction and requires an invitation URL from the target agent. The invitation URL can be either the url or short_url field from an invitation.

Manual

To initiate a connection-less interaction manually, remove the to section. The message to the remote agent must be delivered manually. The Aries-compliant message, which you must manually deliver, is returned in the aries_message field of the response body. Manual delivery of an Aries message depends on the type of agent. To deliver an Aries message to an IBM Verify Identity Access Credentials agent, use the POST /api/v1/aries_message API.