Skip to content

\GroupControllerApi

All URIs are relative to https://api.mailslurp.com

Method HTTP request Description
add_contacts_to_group put /groups/{groupId}/contacts Add contacts to a group
create_group post /groups Create a group
delete_group delete /groups/{groupId} Delete group
get_all_groups get /groups/paginated Get all Contact Groups in paginated format
get_group get /groups/{groupId} Get group
get_group_with_contacts get /groups/{groupId}/contacts Get group and contacts belonging to it
get_group_with_contacts_paginated get /groups/{groupId}/contacts-paginated
get_groups get /groups Get all groups
remove_contacts_from_group delete /groups/{groupId}/contacts Remove contacts from a group

add_contacts_to_group

crate::models::GroupContactsDto add_contacts_to_group(group_id, update_group_contacts) Add contacts to a group

Parameters

Name Type Description Required Notes
group_id String [required]
update_group_contacts UpdateGroupContacts [required]

Return type

crate::models::GroupContactsDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

create_group

crate::models::GroupDto create_group(create_group_options) Create a group

Parameters

Name Type Description Required Notes
create_group_options CreateGroupOptions [required]

Return type

crate::models::GroupDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_group

delete_group(group_id) Delete group

Parameters

Name Type Description Required Notes
group_id String [required]

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_all_groups

crate::models::PageGroupProjection get_all_groups(page, size, sort, since, before) Get all Contact Groups in paginated format

Parameters

Name Type Description Required Notes
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size in list pagination [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to ASC]
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp

Return type

crate::models::PageGroupProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_group

crate::models::GroupDto get_group(group_id) Get group

Parameters

Name Type Description Required Notes
group_id String [required]

Return type

crate::models::GroupDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_group_with_contacts

crate::models::GroupContactsDto get_group_with_contacts(group_id) Get group and contacts belonging to it

Parameters

Name Type Description Required Notes
group_id String [required]

Return type

crate::models::GroupContactsDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_group_with_contacts_paginated

crate::models::PageContactProjection get_group_with_contacts_paginated(group_id, page, size, sort, since, before)

Get group and paginated contacts belonging to it

Parameters

Name Type Description Required Notes
group_id String [required]
page Option<i32> Optional page in group contact pagination [default to 0]
size Option<i32> Optional page size in group contact pagination [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to ASC]
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp

Return type

crate::models::PageContactProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_groups

Vec get_groups() Get all groups

Parameters

This endpoint does not need any parameter.

Return type

Vec

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

remove_contacts_from_group

crate::models::GroupContactsDto remove_contacts_from_group(group_id, update_group_contacts) Remove contacts from a group

Parameters

Name Type Description Required Notes
group_id String [required]
update_group_contacts UpdateGroupContacts [required]

Return type

crate::models::GroupContactsDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]