Skip to main content
PUT
/
image
/
{image_type}
/
{image_id}
/
{field_id}
Update Image Field
curl --request PUT \
  --url https://api.swoogo.com/api/v1/image/{image_type}/{image_id}/{field_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "message": "File Uploaded Successfully",
  "status": 200,
  "type": "registrant",
  "id": "1",
  "field": "profile_picture",
  "url": "https://assets.swoogo.com/uploads/medium/123-abc.jpg"
}

Authorizations

Authorization
string
header
required

OAuth 2.0 bearer token obtained from POST /oauth2/token. Tokens expire after 30 minutes. Include in the Authorization header as Bearer {access_token}.

Path Parameters

image_type
enum<string>
required

string - required - The model type of the object being affected ('registrant', 'contact' or 'sponsor')

Available options:
registrant,
contact,
sponsor
Example:

"contact"

image_id
integer
required

integer - required - The Swoogo ID of the object being affected

Example:

1

field_id
string
required

string - required - The ID of the image field to be updated (e.g. profile_picture, c_12345)

Example:

"c_12345"

Body

multipart/form-data
file
file
required

Image file no larger than 5MB in size and has one of these valid extensions 'jpg', 'jpeg', 'gif', 'png', 'webp', 'svg'

Response

Image uploaded successfully

message
string
Example:

"File Uploaded Successfully"

status
integer
Example:

200

type
enum<string>
Available options:
registrant,
contact,
sponsor
Example:

"registrant"

id
string
Example:

"1"

field
string
Example:

"profile_picture"

url
string | null
Example:

"https://assets.swoogo.com/uploads/medium/123-abc.jpg"