Overview
POST
/auth/user-methodsauthCreate a user auth method (admin)
Create a record in user-methods.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- userIdstring
- providerstring
- providerIdoptionalstring?
- credentialoptionalstring?
Example
{
"userId": "string",
"provider": "string",
"providerId": "string",
"credential": "string"
}Responses
201
created auth method
- idstring
- userIdstring
- providerstring
- providerIdstring?
- hasCredentialboolean
- createdAtstring
- updatedAtstring
Example
{
"id": "string",
"userId": "string",
"provider": "string",
"providerId": "string",
"hasCredential": true,
"createdAt": "string",
"updatedAt": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}403
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}409
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/auth/user-methods" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"userId": "string",
"provider": "string",
"providerId": "string",
"credential": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/auth/user-methods", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"userId\": \"string\",\n \"provider\": \"string\",\n \"providerId\": \"string\",\n \"credential\": \"string\"\n}",
});
const data = await res.json();